From f19b5c8f343ed95d02a4be3870a3f1c7ff43223f Mon Sep 17 00:00:00 2001 From: Chrissi2812 Date: Tue, 28 May 2019 13:52:40 +0200 Subject: [PATCH] add toggleSearch event --- packages/tiptap-extensions/src/extensions/Search.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/tiptap-extensions/src/extensions/Search.js b/packages/tiptap-extensions/src/extensions/Search.js index ba0831193..2603968e9 100644 --- a/packages/tiptap-extensions/src/extensions/Search.js +++ b/packages/tiptap-extensions/src/extensions/Search.js @@ -14,6 +14,10 @@ export default class Search extends Extension { return 'search' } + init() { + this.editor.events.push('toggleSearch') + } + get defaultOptions() { return { autoSelectNext: true, @@ -26,6 +30,7 @@ export default class Search extends Extension { toggleSearch() { return () => { this.options.searching = !this.options.searching + this.editor.emit('toggleSearch', this.options.searching) return true } }