mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
feat(editor): rewrite <i> to <em>
This commit is contained in:
@@ -59,6 +59,7 @@ import { Style } from "../../ckeditor5-style";
|
||||
import MentionCustomization from './mention_customization';
|
||||
import UploadimagePlugin from './uploadimage';
|
||||
import InternalLinkPlugin from './internallink';
|
||||
import ItalicAsEmPlugin from './italic_as_em';
|
||||
import MarkdownImportPlugin from './markdownimport';
|
||||
import CuttonotePlugin from './cuttonote';
|
||||
import IncludeNote from './includenote';
|
||||
@@ -135,6 +136,7 @@ export const COMMON_PLUGINS = [
|
||||
FindAndReplace,
|
||||
Mention,
|
||||
InternalLinkPlugin,
|
||||
ItalicAsEmPlugin,
|
||||
MarkdownImportPlugin,
|
||||
CuttonotePlugin,
|
||||
MentionCustomization,
|
||||
|
||||
15
packages/ckeditor5-build-trilium/src/italic_as_em.ts
Normal file
15
packages/ckeditor5-build-trilium/src/italic_as_em.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
|
||||
|
||||
export default class ItalicAsEmPlugin extends Plugin {
|
||||
|
||||
init() {
|
||||
this.editor.conversion
|
||||
.for("downcast")
|
||||
.attributeToElement({
|
||||
model: "italic",
|
||||
view: "em",
|
||||
converterPriority: "high"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user