Browse Source

Merge pull request #464 from ckeditor/t/ckeditor5/1477

Docs: Adjustments to new `data#ready` event.
Piotr Jasiun 6 years ago
parent
commit
db5e6dd069

+ 2 - 5
packages/ckeditor5-ui/docs/_snippets/examples/bootstrap-ui-inner.js

@@ -87,11 +87,8 @@ export default class BootstrapEditor extends Editor {
 					.then( () => editor.editing.view.attachDomRoot( editor.ui.getEditableElement() ) )
 					// Fill the editable with the initial data.
 					.then( () => editor.data.init( getDataFromElement( element ) ) )
-					// Fire the events that announce that the editor is complete and ready to use.
-					.then( () => {
-						editor.fire( 'dataReady' );
-						editor.fire( 'ready' );
-					} )
+					// Fire the `editor#ready` event that announce the editor is complete and ready to use.
+					.then( () => editor.fire( 'ready' ) )
 					.then( () => editor )
 			);
 		} );

+ 2 - 5
packages/ckeditor5-ui/docs/framework/guides/external-ui.md

@@ -106,11 +106,8 @@ export default class BootstrapEditor extends Editor {
 					.then( () => editor.editing.view.attachDomRoot( editor.ui.getEditableElement() ) )
 					// Fill the editable with the initial data.
 					.then( () => editor.data.init( getDataFromElement( element ) ) )
-					// Fire the events that announce that the editor is complete and ready to use.
-					.then( () => {
-						editor.fire( 'dataReady' );
-						editor.fire( 'ready' );
-					} )
+					// Fire the `editor#ready` event that announce the editor is complete and ready to use.
+					.then( () => editor.fire( 'ready' ) )
 					.then( () => editor )
 			);
 		} );