Selaa lähdekoodia

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

Krzysztof Krztoń 6 vuotta sitten
vanhempi
commit
112035b370
1 muutettua tiedostoa jossa 2 lisäystä ja 7 poistoa
  1. 2 7
      packages/ckeditor5-editor-classic/src/classiceditorui.js

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

@@ -70,13 +70,6 @@ export default class ClassicEditorUI extends EditorUI {
 	}
 
 	/**
-	 * @inheritDoc
-	 */
-	getEditableElement( rootName = 'main' ) {
-		return this.view.editable.name === rootName ? this.view.editable.element : null;
-	}
-
-	/**
 	 * Initializes the UI.
 	 *
 	 * @param {HTMLElement|null} replacementElement The DOM element that will be the source for the created editor.
@@ -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 );