8
0
Эх сурвалжийг харах

Draft of the view root destriction.

Aleksander Nowodzinski 7 жил өмнө
parent
commit
80d4fe20cf

+ 8 - 1
packages/ckeditor5-editor-inline/src/inlineeditorui.js

@@ -54,7 +54,7 @@ export default class InlineEditorUI extends EditorUI {
 		view.editable.name = editingRoot.rootName;
 
 		editor.on( 'dataReady', () => {
-			view.editable.attachDomRootActions();
+			view.editable.enableDomRootActions();
 
 			attachPlaceholder( editingView, getPlaceholderElement( editingRoot ), 'Type some text...' );
 		} );
@@ -89,6 +89,13 @@ export default class InlineEditorUI extends EditorUI {
 			toolbar: view.toolbar
 		} );
 	}
+
+	destroy() {
+		this.view.editable.disableDomRootActions();
+		this.editor.editing.view.detachDomRoots();
+
+		super.destroy();
+	}
 }
 
 function getPlaceholderElement( viewRoot ) {