Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(editor): rewrite <s> to <del>
Elian Doran1a1cb3d60be4
diff --git a/packages/ckeditor5-build-trilium/src/config.ts b/packages/ckeditor5-build-trilium/src/config.tsindex a6a90a802f..f385f81f6e 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.tsnew file mode 100644index 0000000000..08f00cfc76--- /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"+ });+ }++}