mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 17:25:52 +01:00
chore(ckeditor5/plugins): integrate italic as em & strikehtrough as del
This commit is contained in:
15
packages/ckeditor5/src/plugins/italic_as_em.ts
Normal file
15
packages/ckeditor5/src/plugins/italic_as_em.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Plugin } from "ckeditor5";
|
||||
|
||||
export default class ItalicAsEmPlugin extends Plugin {
|
||||
|
||||
init() {
|
||||
this.editor.conversion
|
||||
.for("downcast")
|
||||
.attributeToElement({
|
||||
model: "italic",
|
||||
view: "em",
|
||||
converterPriority: "high"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
15
packages/ckeditor5/src/plugins/strikethrough_as_del.ts
Normal file
15
packages/ckeditor5/src/plugins/strikethrough_as_del.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Plugin } from "ckeditor5";
|
||||
|
||||
export default class StrikethroughAsDel extends Plugin {
|
||||
|
||||
init() {
|
||||
this.editor.conversion
|
||||
.for("downcast")
|
||||
.attributeToElement({
|
||||
model: "strikethrough",
|
||||
view: "del",
|
||||
converterPriority: "high"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user