add basic lowlight extension

This commit is contained in:
Philipp Kühn
2021-04-02 00:07:40 +02:00
parent 4d882af5d7
commit 7adf1853d7
16 changed files with 476 additions and 0 deletions

View File

@@ -58,6 +58,7 @@ export class Editor extends EventEmitter {
parseOptions: {},
enableInputRules: true,
enablePasteRules: true,
onBeforeCreate: () => null,
onCreate: () => null,
onUpdate: () => null,
onSelectionUpdate: () => null,
@@ -75,6 +76,8 @@ export class Editor extends EventEmitter {
this.createExtensionManager()
this.createCommandManager()
this.createSchema()
this.on('beforeCreate', this.options.onCreate)
this.emit('beforeCreate', { editor: this })
this.createView()
this.injectCSS()
this.on('create', this.options.onCreate)