0
我正在使用Tinymce 4x與現代主題。我允許個人擁有該編輯器的同一副本 ,但只允許其中一個編輯它。我需要禁用tinymce工具欄以防止這些用戶中的一個通過它們。我的編輯工具欄時,我初始化編輯器的樣子:禁用Tinymce工具欄oninit
toolbar1: "newdocument fullpage | bold italic underline strikethrough | alignleft aligncenter
alignright alignjustify ",
toolbar2: "cut copy paste | searchreplace | bullist numlist | outdent indent blockquoter",
toolbar3: "table | hr removeformat | subscript superscript |charmap emoticons|print fullscreen "
I need to disable toolbar1, toolbar2 and toolbar3 and I try to use :
/*tinymce.ui.toolbar1.setDisabled = true; for all these bars but it does not work. It seems that
this is only used for the user created toolbars.
Also I tried to add listener and then stop the propagation when the toolbar is clicked but also
it doesn't work
toolbarElement.addEventListener("click", function(e){
e.stopPropagation();
});
toolbarElement.style.pointerEvents = "none";
}
Please can someone help me. Thanks in advance for your suggestions.
謝謝您的回答「大盤雞」,但它不工作,因爲當我初始化編輯器所花費的空值並將其分配給工具欄。當我有oninit事件時,我需要改變這一點,而不是當init事件:/ – Rose 2014-10-28 09:47:16