|
|
@@ -581,6 +581,10 @@ export default class PlaceholderUI extends Plugin {
|
|
|
withText: true
|
|
|
} );
|
|
|
|
|
|
+ // Disable the placeholder button when the command is disabled.
|
|
|
+ const command = editor.commands.get( 'placeholder' );
|
|
|
+ dropdownView.bind( 'isEnabled' ).to( command );
|
|
|
+
|
|
|
// Execute the command when the dropdown item is clicked (executed).
|
|
|
this.listenTo( dropdownView, 'execute', evt => {
|
|
|
editor.execute( 'placeholder', { value: evt.source.commandParam } );
|
|
|
@@ -805,6 +809,10 @@ class PlaceholderUI extends Plugin {
|
|
|
withText: true
|
|
|
} );
|
|
|
|
|
|
+ // Disable the placeholder button when the command is disabled.
|
|
|
+ const command = editor.commands.get( 'placeholder' );
|
|
|
+ dropdownView.bind( 'isEnabled' ).to( command );
|
|
|
+
|
|
|
// Execute the command when the dropdown item is clicked (executed).
|
|
|
this.listenTo( dropdownView, 'execute', evt => {
|
|
|
editor.execute( 'placeholder', { value: evt.source.commandParam } );
|