added pasteRules to marks

This commit is contained in:
Chrissi2812
2019-01-31 15:11:16 +01:00
parent e0fbea0734
commit 027a4db452
5 changed files with 31 additions and 4 deletions

View File

@@ -31,6 +31,7 @@ export default class Editor {
onUpdate: () => {},
onFocus: () => {},
onBlur: () => {},
onPaste: () => {},
}
this.init(options)
@@ -198,6 +199,8 @@ export default class Editor {
createView() {
const view = new EditorView(this.element, {
state: this.state,
handlePaste: this.options.onPaste,
handleDrop: this.options.onPaste,
dispatchTransaction: this.dispatchTransaction.bind(this),
})