Parcourir la source

The `getEditableElement()` method was moved to base class.

Krzysztof Krztoń il y a 7 ans
Parent
commit
112035b370
1 fichiers modifiés avec 2 ajouts et 7 suppressions
  1. 2 7
      packages/ckeditor5-editor-classic/src/classiceditorui.js

+ 2 - 7
packages/ckeditor5-editor-classic/src/classiceditorui.js

@@ -69,13 +69,6 @@ export default class ClassicEditorUI extends EditorUI {
 		return this.view.element;
 	}
 
-	/**
-	 * @inheritDoc
-	 */
-	getEditableElement( rootName = 'main' ) {
-		return this.view.editable.name === rootName ? this.view.editable.element : null;
-	}
-
 	/**
 	 * Initializes the UI.
 	 *
@@ -101,6 +94,8 @@ export default class ClassicEditorUI extends EditorUI {
 		view.editable.bind( 'isFocused' ).to( editor.editing.view.document );
 		view.editable.name = editingRoot.rootName;
 
+		this._editableElements.push( view.editable );
+
 		this.focusTracker.add( view.editable.editableElement );
 
 		view.toolbar.fillFromConfig( this._toolbarConfig.items, this.componentFactory );