8
0
Pārlūkot izejas kodu

The IndentCommand could return nodes that were modified.

Kamil Piechaczek 5 gadi atpakaļ
vecāks
revīzija
5a3e3072e5
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      packages/ckeditor5-list/src/indentcommand.js

+ 3 - 1
packages/ckeditor5-list/src/indentcommand.js

@@ -53,7 +53,7 @@ export default class IndentCommand extends Command {
 		const doc = model.document;
 		let itemsToChange = Array.from( doc.selection.getSelectedBlocks() );
 
-		model.change( writer => {
+		return model.change( writer => {
 			const lastItem = itemsToChange[ itemsToChange.length - 1 ];
 
 			// Indenting a list item should also indent all the items that are already sub-items of indented item.
@@ -90,6 +90,8 @@ export default class IndentCommand extends Command {
 					writer.setAttribute( 'listIndent', indent, item );
 				}
 			}
+
+			return itemsToChange;
 		} );
 	}