Merge pull request #257 from jasonvarga/master

Allow extensions to override stopEvent
This commit is contained in:
Philipp Kühn
2019-04-11 19:55:16 +02:00
committed by GitHub

View File

@@ -108,6 +108,10 @@ export default class ComponentView {
// disable (almost) all prosemirror event listener for node views // disable (almost) all prosemirror event listener for node views
stopEvent(event) { stopEvent(event) {
if (typeof this.extension.stopEvent === 'function') {
return this.extension.stopEvent(event)
}
const isPaste = event.type === 'paste' const isPaste = event.type === 'paste'
const draggable = !!this.extension.schema.draggable const draggable = !!this.extension.schema.draggable