How to enable or disable the CKEditor save button using external JS? I donβt want to completely remove it, just change the appearance between the gray and color icon to make it more convenient.
My save button is created like this:
CKEDITOR.plugins.registered['save'] = { init : function( editor ) { var command = editor.addCommand( 'save', { modes : { wysiwyg:1, source:1 }, exec : function( editor ) { if(My.Own.CheckDirty()) My.Own.Save(); else alert("No changes."); } }); editor.ui.addButton( 'Save',{label : '',command : 'save'}); } }
source share