mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-18 16:32:33 +08:00
feat(editor): support general HTML elements
This commit is contained in:
parent
9997f5c17a
commit
bc78455da1
4
libraries/ckeditor/ckeditor.js
vendored
4
libraries/ckeditor/ckeditor.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -176,7 +176,15 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.watchdog.setCreator(async (elementOrData, editorConfig) => {
|
this.watchdog.setCreator(async (elementOrData, editorConfig) => {
|
||||||
const editor = await editorClass.create(elementOrData, editorConfig);
|
const editor = await editorClass.create(elementOrData, {
|
||||||
|
...editorConfig,
|
||||||
|
htmlSupport: {
|
||||||
|
allow: JSON.parse(options.get("allowedHtmlTags")),
|
||||||
|
styles: true,
|
||||||
|
classes: true,
|
||||||
|
attributes: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
await initSyntaxHighlighting(editor);
|
await initSyntaxHighlighting(editor);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user