mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-30 00:51:30 +08:00
feat(editor): rewrite <i> to <em>
This commit is contained in:
parent
9af9845985
commit
15de8e1b57
@ -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"
|
||||
});
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user