From dad0d074aaecfabe81670134384cf1fe65278060 Mon Sep 17 00:00:00 2001 From: Ryan McKay-Fleming Date: Thu, 1 Aug 2019 17:10:11 -0400 Subject: [PATCH] Allow the extension to redefine the behaviour of setSelection --- packages/tiptap/src/Utils/ComponentView.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/tiptap/src/Utils/ComponentView.js b/packages/tiptap/src/Utils/ComponentView.js index c72d52b18..64c620097 100644 --- a/packages/tiptap/src/Utils/ComponentView.js +++ b/packages/tiptap/src/Utils/ComponentView.js @@ -41,6 +41,10 @@ export default class ComponentView { updateAttrs: attrs => this.updateAttrs(attrs), } + if (typeof this.extension.setSelection === 'function') { + this.setSelection = this.extension.setSelection + } + this.vm = new Component({ parent: this.parent, propsData: props,