mirror of
https://github.com/zadam/trilium.git
synced 2025-10-19 22:58:52 +02:00
chore(dx/client): fix SVG icons causing errors in CKEditor
This commit is contained in:
parent
46cb869237
commit
5f1d2f02ee
@ -12,7 +12,6 @@ import { buildSelectedBackgroundColor } from "../../components/touch_bar.js";
|
||||
import { buildConfig, BuildEditorOptions, OPEN_SOURCE_LICENSE_KEY } from "./ckeditor/config.js";
|
||||
import type FNote from "../../entities/fnote.js";
|
||||
import { PopupEditor, ClassicEditor, EditorWatchdog, type CKTextEditor, type MentionFeed, type WatchdogConfig, EditorConfig } from "@triliumnext/ckeditor5";
|
||||
import "@triliumnext/ckeditor5/index.css";
|
||||
import { updateTemplateCache } from "./ckeditor/snippets.js";
|
||||
|
||||
const TPL = /*html*/`
|
||||
|
@ -10,7 +10,7 @@
|
||||
import { Plugin, addListToDropdown, createDropdown, ListDropdownItemDefinition, SplitButtonView, ViewModel } from 'ckeditor5';
|
||||
|
||||
import '../theme/blockquote.css';
|
||||
import admonitionIcon from '../theme/icons/admonition.svg';
|
||||
import admonitionIcon from '../theme/icons/admonition.svg?raw';
|
||||
import { AdmonitionType } from './admonitioncommand.js';
|
||||
import { Collection } from 'ckeditor5';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import admonitionIcon from '../theme/icons/admonition.svg';
|
||||
import admonitionIcon from '../theme/icons/admonition.svg?raw';
|
||||
import './augmentation.js';
|
||||
import "../theme/blockquote.css";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
declare module '*.svg' {
|
||||
declare module '*.svg?raw' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
ELEMENTS,
|
||||
TOOLBAR_COMPONENT_NAME
|
||||
} from './constants.js';
|
||||
import insertFootnoteIcon from '../theme/icons/insert-footnote.svg';
|
||||
import insertFootnoteIcon from '../theme/icons/insert-footnote.svg?raw';
|
||||
import { modelQueryElement, modelQueryElementsAll } from './utils.js';
|
||||
|
||||
export default class FootnoteUI extends Plugin {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import insertFootnoteIcon from './../theme/icons/insert-footnote.svg';
|
||||
import insertFootnoteIcon from './../theme/icons/insert-footnote.svg?raw';
|
||||
import './augmentation.js';
|
||||
import "../theme/footnote.css";
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
declare module '*.svg' {
|
||||
declare module '*.svg?raw' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import kbdIcon from '../theme/icons/kbd.svg';
|
||||
import kbdIcon from '../theme/icons/kbd.svg?raw';
|
||||
import './augmentation.js';
|
||||
|
||||
export { default as Kbd } from './kbd.js';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { AttributeCommand, ButtonView, Plugin } from 'ckeditor5';
|
||||
import kbdIcon from '../theme/icons/kbd.svg';
|
||||
import kbdIcon from '../theme/icons/kbd.svg?raw';
|
||||
|
||||
const KBD = 'kbd';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
declare module '*.svg' {
|
||||
declare module '*.svg?raw' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import ckeditor from './../theme/icons/math.svg';
|
||||
import ckeditor from './../theme/icons/math.svg?raw';
|
||||
import './augmentation.js';
|
||||
import "../theme/mathform.css";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import MathEditing from './mathediting.js';
|
||||
import MainFormView from './ui/mainformview.js';
|
||||
import mathIcon from '../theme/icons/math.svg';
|
||||
import mathIcon from '../theme/icons/math.svg?raw';
|
||||
import { Plugin, ClickObserver, ButtonView, ContextualBalloon, clickOutsideHandler, CKEditorError, uid } from 'ckeditor5';
|
||||
import { getBalloonPositionData } from './utils.js';
|
||||
import MathCommand from './mathcommand.js';
|
||||
@ -54,10 +54,10 @@ export default class MathUI extends Plugin {
|
||||
this._addFormView();
|
||||
|
||||
this._balloon.showStack( 'main' );
|
||||
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
this.formView?.mathInputView.fieldView.element?.focus();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private _createFormView() {
|
||||
|
2
packages/ckeditor5-math/typings/types.d.ts
vendored
2
packages/ckeditor5-math/typings/types.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
declare module '*.svg' {
|
||||
declare module '*.svg?raw' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
import './augmentation.js';
|
||||
|
||||
export { default as Mermaid } from './mermaid.js';
|
||||
import infoIcon from './../theme/icons/info.svg';
|
||||
import insertMermaidIcon from './../theme/icons/insert.svg';
|
||||
import previewModeIcon from './../theme/icons/preview-mode.svg';
|
||||
import splitModeIcon from './../theme/icons/split-mode.svg';
|
||||
import sourceModeIcon from './../theme/icons/source-mode.svg';
|
||||
import infoIcon from './../theme/icons/info.svg?raw';
|
||||
import insertMermaidIcon from './../theme/icons/insert.svg?raw';
|
||||
import previewModeIcon from './../theme/icons/preview-mode.svg?raw';
|
||||
import splitModeIcon from './../theme/icons/split-mode.svg?raw';
|
||||
import sourceModeIcon from './../theme/icons/source-mode.svg?raw';
|
||||
import "../theme/mermaid.css";
|
||||
|
||||
export const icons = {
|
||||
|
@ -2,11 +2,11 @@
|
||||
* @module mermaid/mermaidui
|
||||
*/
|
||||
|
||||
import insertMermaidIcon from '../theme/icons/insert.svg';
|
||||
import previewModeIcon from '../theme/icons/preview-mode.svg';
|
||||
import splitModeIcon from '../theme/icons/split-mode.svg';
|
||||
import sourceModeIcon from '../theme/icons/source-mode.svg';
|
||||
import infoIcon from '../theme/icons/info.svg';
|
||||
import insertMermaidIcon from '../theme/icons/insert.svg?raw';
|
||||
import previewModeIcon from '../theme/icons/preview-mode.svg?raw';
|
||||
import splitModeIcon from '../theme/icons/split-mode.svg?raw';
|
||||
import sourceModeIcon from '../theme/icons/source-mode.svg?raw';
|
||||
import infoIcon from '../theme/icons/info.svg?raw';
|
||||
import { ButtonView, Editor, ModelElement, Locale, Observable, Plugin } from 'ckeditor5';
|
||||
import InsertMermaidCommand from './commands/insertMermaidCommand.js';
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { Mermaid as MermaidDll, icons } from '../src/index.js';
|
||||
import Mermaid from '../src/mermaid.js';
|
||||
|
||||
import infoIcon from './../theme/icons/info.svg';
|
||||
import insertMermaidIcon from './../theme/icons/insert.svg';
|
||||
import previewModeIcon from './../theme/icons/preview-mode.svg';
|
||||
import splitModeIcon from './../theme/icons/split-mode.svg';
|
||||
import sourceModeIcon from './../theme/icons/source-mode.svg';
|
||||
import infoIcon from './../theme/icons/info.svg?raw';
|
||||
import insertMermaidIcon from './../theme/icons/insert.svg?raw';
|
||||
import previewModeIcon from './../theme/icons/preview-mode.svg?raw';
|
||||
import splitModeIcon from './../theme/icons/split-mode.svg?raw';
|
||||
import sourceModeIcon from './../theme/icons/source-mode.svg?raw';
|
||||
import { describe, it } from 'vitest';
|
||||
import { expect } from 'vitest';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
declare module '*.svg' {
|
||||
declare module '*.svg?raw' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import cancelIcon from '@ckeditor/ckeditor5-core/theme/icons/cancel.svg';
|
||||
import cancelIcon from '@ckeditor/ckeditor5-core/theme/icons/cancel.svg?raw';
|
||||
import { ButtonView, Locale, toUnit, View } from 'ckeditor5';
|
||||
|
||||
const toPx = toUnit('%');
|
||||
|
Loading…
x
Reference in New Issue
Block a user