Browse Source

Destroy RTE module

pull/2471/head
Artur Arseniev 7 years ago
parent
commit
0a0e23043b
  1. 4
      src/editor/model/Editor.js
  2. 2
      src/rich_text_editor/index.js

4
src/editor/model/Editor.js

@ -656,7 +656,8 @@ export default Backbone.Model.extend({
UndoManager,
Panels,
Canvas,
Keymaps
Keymaps,
RichTextEditor
} = this.attributes;
DomComponents.clear();
CssComposer.clear();
@ -664,6 +665,7 @@ export default Backbone.Model.extend({
Panels.getPanels().reset();
Canvas.getCanvasView().remove();
Keymaps.removeAll();
RichTextEditor.destroy();
this.view.remove();
this.stopListening();
$(this.config.el)

2
src/rich_text_editor/index.js

@ -115,7 +115,7 @@ export default () => {
const pfx = this.pfx;
const actionbarContainer = toolbar;
const actionbar = this.actionbar;
const actions = this.actions || config.actions;
const actions = this.actions || [...config.actions];
const classes = {
actionbar: `${pfx}actionbar`,
button: `${pfx}action`,

Loading…
Cancel
Save