8
0
فهرست منبع

Moved the attachDomRoot from ClassicEditor to ClassicEditorUI just like in other editors.

Aleksander Nowodzinski 7 سال پیش
والد
کامیت
fb736050dc

+ 0 - 1
packages/ckeditor5-editor-classic/src/classiceditor.js

@@ -173,7 +173,6 @@ export default class ClassicEditor extends Editor {
 			resolve(
 				editor.initPlugins()
 					.then( () => editor.ui.init( isElement( sourceElementOrData ) ? sourceElementOrData : null ) )
-					.then( () => editor.editing.view.attachDomRoot( editor.ui.getEditableElement() ) )
 					.then( () => {
 						const initialData = isElement( sourceElementOrData ) ?
 							getDataFromElement( sourceElementOrData ) :

+ 4 - 0
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -100,6 +100,10 @@ export default class ClassicEditorUI extends EditorUI {
 		// toolbar gets focused.
 		view.editable.bind( 'isFocused' ).to( this.focusTracker );
 
+		// Bind the editable UI element to the editing view, making it an end– and entry–point
+		// of the editor's engine. This is where the engine meets the UI.
+		editingView.attachDomRoot( editableElement );
+
 		// If an element containing the initial data of the editor was provided, replace it with
 		// an editor instance's UI in DOM until the editor is destroyed. For instance, a <textarea>
 		// can be such element.