2015-04-30 27 views
2

我正在使用ckeditor 4.7並使用其cdn加載ckeditor。 我想在ckeditor上撥號保存按鈕 我試過CKEDITOR.instances.test_editor.commands.save.disable();但似乎不工作。如何在CkEditor中禁用工具欄中的保存按鈕4.4.7

下面是我的代碼

<html> 
    <head>  
     <script src="//code.jquery.com/jquery-1.10.2.js"></script> 
     <script> 
      $("#ccfive_test_editor").ready(function() { 
       $("#ccfive_test_editor").siblings().hide(); 
       $.getScript('//cdn.ckeditor.com/4.4.7/full/ckeditor.js', function() { 
        $.getScript('//cdn.ckeditor.com/4.4.7/standard/adapters/jquery.js', function() { 
         $("#ccfive_test_editor").ckeditor(); 
         CKEDITOR.config.height = 400; 
         CKEDITOR.instances.ccfive_test_editor.commands.save.disable(); 
        }); 
       }); 
      }); 
     </script> 
    </head> 
    <body>  
     <form name="ckfrm" id="ckfrm"> 
      <textarea cols="10" id="ccfive_test_editor" name="ccfive_test_editor" rows="10"></textarea> 
     </form> 
    </body> 
</html> 
+0

ckeditor 4.4.7可能會改變某些功能,爲什麼'commands'不能'disable(),enable()'方法。 –

回答

1

我不知道你所說的「禁用按鈕」的意思 - 你想完全刪除您希望能夠將Save插件報價,執行功能在代碼中需要時手動啓用和禁用按鈕?

CKEditor的擁有,讓您刪除不必要的功能,兩個有用的配置值:

+0

謝謝@安娜。通過禁用我的意思是灰色它。這完全刪除按鈕。 – Viral

+0

請更正您的問題,因爲在標題中您還問過如何隱藏。 – Reinmar

相關問題