diff --git a/packages/ckeditor5-build-trilium/src/config.ts b/packages/ckeditor5-build-trilium/src/config.ts index a6a90a802..f385f81f6 100644 --- a/packages/ckeditor5-build-trilium/src/config.ts +++ b/packages/ckeditor5-build-trilium/src/config.ts @@ -78,6 +78,7 @@ import '../../ckeditor5-footnotes/src/footnote.css'; import { Footnotes } from '../../ckeditor5-footnotes'; import Kbd from "../../ckeditor5-keyboard-marker/src/Kbd"; import { Admonition } from "../../ckeditor5-admonition"; +import StrikethroughAsDel from './strikethrough_as_del'; export const COMMON_PLUGINS = [ // essentials package expanded to allow selectively disable Enter and ShiftEnter @@ -136,6 +137,7 @@ export const COMMON_PLUGINS = [ Mention, InternalLinkPlugin, ItalicAsEmPlugin, + StrikethroughAsDel, MarkdownImportPlugin, CuttonotePlugin, MentionCustomization, diff --git a/packages/ckeditor5-build-trilium/src/strikethrough_as_del.ts b/packages/ckeditor5-build-trilium/src/strikethrough_as_del.ts new file mode 100644 index 000000000..08f00cfc7 --- /dev/null +++ b/packages/ckeditor5-build-trilium/src/strikethrough_as_del.ts @@ -0,0 +1,15 @@ +import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; + +export default class StrikethroughAsDel extends Plugin { + + init() { + this.editor.conversion + .for("downcast") + .attributeToElement({ + model: "strikethrough", + view: "del", + converterPriority: "high" + }); + } + +}