|
|
@@ -53,7 +53,7 @@ export default class IndentBlockCommand extends Command {
|
|
|
const editor = this.editor;
|
|
|
const model = editor.model;
|
|
|
|
|
|
- const block = first( model.document.selection.getTopMostBlocks() );
|
|
|
+ const block = first( model.document.selection.getSelectedBlocks() );
|
|
|
|
|
|
if ( !block || !model.schema.checkAttribute( block, 'blockIndent' ) ) {
|
|
|
this.isEnabled = false;
|
|
|
@@ -94,7 +94,7 @@ export default class IndentBlockCommand extends Command {
|
|
|
function getBlocksToChange( model ) {
|
|
|
const selection = model.document.selection;
|
|
|
const schema = model.schema;
|
|
|
- const blocksInSelection = Array.from( selection.getTopMostBlocks() );
|
|
|
+ const blocksInSelection = Array.from( selection.getSelectedBlocks() );
|
|
|
|
|
|
return blocksInSelection.filter( block => schema.checkAttribute( block, 'blockIndent' ) );
|
|
|
}
|