Artur Arseniev
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
0 deletions
-
packages/core/src/editor/model/Editor.ts
|
|
@ -1025,6 +1025,7 @@ export default class EditorModel extends Model { |
|
|
*/ |
|
|
*/ |
|
|
destroyAll() { |
|
|
destroyAll() { |
|
|
const { config, view } = this; |
|
|
const { config, view } = this; |
|
|
|
|
|
this.trigger('destroy'); |
|
|
const editor = this.getEditor(); |
|
|
const editor = this.getEditor(); |
|
|
// @ts-ignore
|
|
|
// @ts-ignore
|
|
|
const { editors = [] } = config.grapesjs || {}; |
|
|
const { editors = [] } = config.grapesjs || {}; |
|
|
@ -1047,6 +1048,7 @@ export default class EditorModel extends Model { |
|
|
editors.splice(editors.indexOf(editor), 1); |
|
|
editors.splice(editors.indexOf(editor), 1); |
|
|
//@ts-ignore
|
|
|
//@ts-ignore
|
|
|
hasWin() && $(config.el).empty().attr(this.attrsOrig); |
|
|
hasWin() && $(config.el).empty().attr(this.attrsOrig); |
|
|
|
|
|
this.trigger('destroyed'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getEditing(): Component | undefined { |
|
|
getEditing(): Component | undefined { |
|
|
|