|
|
@@ -43,9 +43,6 @@ export default class ToggleAttributeCommand extends Command {
|
|
|
*/
|
|
|
this.set( 'value', false );
|
|
|
|
|
|
- // Refresh the value and state of the command on #changesDone to make sure that
|
|
|
- // the correct state of the command is set initially.
|
|
|
- // https://github.com/ckeditor/ckeditor5-core/issues/50
|
|
|
this.listenTo( editor.document, 'changesDone', () => {
|
|
|
this.refreshValue();
|
|
|
this.refreshState();
|
|
|
@@ -53,7 +50,7 @@ export default class ToggleAttributeCommand extends Command {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Updates command's {@link #value value} based on current selection.
|
|
|
+ * Updates command's {@link #value value} based on the current selection.
|
|
|
*/
|
|
|
refreshValue() {
|
|
|
this.value = this.editor.document.selection.hasAttribute( this.attributeKey );
|