0
我想知道是否可以禁用工具欄的小工具代碼的'可編輯'部分中的特定小部件?我目前已經爲小部件設置了下面的代碼。在這些選擇器中,我不希望用戶在ToolBar中添加特定的小部件。當光標位於小部件的可編輯部分時,禁用ToolBar中的特定按鈕? (CKEditor版本4.5.11)
this.editables = {
content1: {
selector: '.content1',
allowedContent: this.allowedContent
},
content2: {
selector: '.content2',
allowedContent: this.allowedContent
},
content3: {
selector: '.content3',
allowedContent: this.allowedContent
}
};
我已經嘗試在下面的邏輯中添加,但它打破了我的代碼。
var oWidget= editor.getCommand('customWidget')
oWidget.setState(CKEDITOR.TRISTATE_DISABLED);
任何意見將不勝感激。
謝謝!