From 748eb869088f5cdaf3982993492070d44c90f5d4 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 25 Dec 2019 19:54:19 +0100 Subject: [PATCH] Add destroy method to RTE module --- src/rich_text_editor/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/rich_text_editor/index.js b/src/rich_text_editor/index.js index 42935d8b3..29b183d96 100644 --- a/src/rich_text_editor/index.js +++ b/src/rich_text_editor/index.js @@ -83,6 +83,16 @@ export default () => { return this; }, + destroy() { + const { customRte } = this; + globalRte && globalRte.destroy(); + customRte && customRte.destroy && customRte.destroy(); + toolbar = 0; + globalRte = 0; + this.actionbar = 0; + this.actions = 0; + }, + /** * Post render callback * @param {View} ev