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

Internal: Fixed order of converters - let's have data pipeline defined first and then the editing pipeline.

Piotrek Koszuliński 6 лет назад
Родитель
Сommit
e6a3ded4ec
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      packages/ckeditor5-list/src/todolistediting.js

+ 3 - 3
packages/ckeditor5-list/src/todolistediting.js

@@ -72,14 +72,14 @@ export default class TodoListEditing extends Plugin {
 		editor.commands.add( 'todoListCheck', new TodoListCheckCommand( editor ) );
 
 		// Define converters.
+		data.downcastDispatcher.on( 'insert:listItem', dataModelViewInsertion( model ), { priority: 'high' } );
+		data.downcastDispatcher.on( 'insert:$text', dataModelViewTextInsertion, { priority: 'high' } );
+
 		editing.downcastDispatcher.on(
 			'insert:listItem',
 			modelViewInsertion( model, listItem => this._handleCheckmarkChange( listItem ) ),
 			{ priority: 'high' }
 		);
-		data.downcastDispatcher.on( 'insert:listItem', dataModelViewInsertion( model ), { priority: 'high' } );
-		data.downcastDispatcher.on( 'insert:$text', dataModelViewTextInsertion, { priority: 'high' } );
-
 		editing.downcastDispatcher.on(
 			'attribute:listType:listItem',
 			modelViewChangeType( listItem => this._handleCheckmarkChange( listItem ), editing.view )