Преглед изворни кода

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

Internal: Adjustments to new `data#ready` event.
Piotr Jasiun пре 7 година
родитељ
комит
e8f9696435
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      packages/ckeditor5-paragraph/src/paragraph.js

+ 2 - 2
packages/ckeditor5-paragraph/src/paragraph.js

@@ -104,11 +104,11 @@ export default class Paragraph extends Plugin {
 		// Empty roots autoparagraphing. -----------------------------------------------
 
 		// Post-fixer which takes care of adding empty paragraph elements to empty roots.
-		// Besides fixing content on #changesDone we also need to handle #dataReady because
+		// Besides fixing content on #changesDone we also need to handle editor.data#ready event because
 		// if initial data is empty or setData() wasn't even called there will be no #change fired.
 		model.document.registerPostFixer( writer => this._autoparagraphEmptyRoots( writer ) );
 
-		editor.on( 'dataReady', () => {
+		editor.data.on( 'ready', () => {
 			model.enqueueChange( 'transparent', writer => this._autoparagraphEmptyRoots( writer ) );
 		}, { priority: 'lowest' } );
 	}