feat(editor): support general HTML elements

This commit is contained in:
Elian Doran 2024-11-28 22:11:54 +02:00
parent 9997f5c17a
commit bc78455da1
No known key found for this signature in database
3 changed files with 12 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -176,7 +176,15 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
});
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);