Controlling save button enabled/disabled state programmatically

后端 未结 1 2046
盖世英雄少女心
盖世英雄少女心 2021-02-09 21:43

How would I enable/disable the save button of CKEditor using external JS? I don\'t want to remove it completely, just change the appearance between gray and colored icon so that

相关标签:
1条回答
  • 2021-02-09 22:05

    Here you go:

    For 3.6.x:

    CKEDITOR.instances.yourEditorInstance.getCommand( 'save' ).disable();
    CKEDITOR.instances.yourEditorInstance.getCommand( 'save' ).enable();
    

    For 4.x:

    CKEDITOR.instances.yourEditorInstance.commands.save.disable();
    CKEDITOR.instances.yourEditorInstance.commands.save.enable();
    
    0 讨论(0)
提交回复
热议问题