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

Adjustments to new data#ready event.

Krzysztof Krztoń 7 лет назад
Родитель
Сommit
6ea63defc0
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' } );
 	}