add editorProps to editorOptions

This commit is contained in:
Philipp Kühn
2020-11-17 21:21:19 +01:00
parent 14c6bfce6f
commit 82a57351a7
2 changed files with 9 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ export class Editor extends EventEmitter {
extensions: [],
autofocus: false,
editable: true,
editorProps: {},
parseOptions: {},
onInit: () => null,
onUpdate: () => null,
@@ -234,6 +235,7 @@ export class Editor extends EventEmitter {
*/
private createView() {
this.view = new EditorView(this.options.element, {
...this.options.editorProps,
dispatchTransaction: this.dispatchTransaction.bind(this),
state: EditorState.create({
doc: this.createDocument(this.options.content),