|
|
@@ -42,16 +42,14 @@ export default class RestrictedEditingExceptionCommand extends Command {
|
|
|
writer.setSelectionAttribute( 'restrictedEditingException', valueToSet );
|
|
|
} else {
|
|
|
const isSameException = value => value.item.getAttribute( 'restrictedEditingException' ) === this.value;
|
|
|
- const exceptionStart = selection.focus.getLastMatchingPosition( isSameException,
|
|
|
- { direction: 'backward' } );
|
|
|
+ const exceptionStart = selection.focus.getLastMatchingPosition( isSameException, { direction: 'backward' } );
|
|
|
const exceptionEnd = selection.focus.getLastMatchingPosition( isSameException );
|
|
|
const focus = selection.focus;
|
|
|
|
|
|
writer.removeSelectionAttribute( 'restrictedEditingException' );
|
|
|
|
|
|
if ( !( focus.isEqual( exceptionStart ) || focus.isEqual( exceptionEnd ) ) ) {
|
|
|
- writer.removeAttribute( 'restrictedEditingException', writer.createRange( exceptionStart,
|
|
|
- exceptionEnd ) );
|
|
|
+ writer.removeAttribute( 'restrictedEditingException', writer.createRange( exceptionStart, exceptionEnd ) );
|
|
|
}
|
|
|
}
|
|
|
} else {
|