8
0
Просмотр исходного кода

Delegate `ready` event as `uiReady` event instead of using `ready()` method.

Krzysztof Krztoń 7 лет назад
Родитель
Сommit
b8881670c4
1 измененных файлов с 3 добавлено и 11 удалено
  1. 3 11
      packages/ckeditor5-core/src/editor/editorui.js

+ 3 - 11
packages/ckeditor5-core/src/editor/editorui.js

@@ -91,6 +91,9 @@ export default class EditorUI {
 
 		// Informs UI components that should be refreshed after layout change.
 		this.listenTo( editor.editing.view.document, 'layoutChanged', () => this.update() );
+
+		// Delegate `ready` as `editor.uiReady` event. The `uiReady` is deprecated and should be fired too.
+		this.delegate( 'ready' ).to( this.editor, 'uiReady' );
 	}
 
 	/**
@@ -139,17 +142,6 @@ export default class EditorUI {
 		return null;
 	}
 
-	/**
-	 * Fires the {@link module:core/editor/editorui~EditorUI#event:ready `ready`} event.
-	 *
-	 * This method should be called after {@link module:core/editor/editor~Editor#event:pluginsReady} and before
-	 * {@link module:core/editor/editor~Editor#event:dataReady} by the specific editor creator.
-	 */
-	ready() {
-		this.fire( 'ready' );
-		this.editor.fire( 'uiReady' );
-	}
-
 	/**
 	 * Fires the {@link module:core/editor/editorui~EditorUI#event:update `update`} event.
 	 *