4
A
回答
5
想通了
if (dialogName == 'link')
{
var infoTab = dialogDefinition.getContents('info');
var linktypeField = infoTab.get('linkType');
/* Remove it from the array of items */
linktypeField['items'].splice(1, 1);
}
3
dialogDefinition允許您完全重新設計對話框。
我做了這樣的基礎上,例如在http://nightly.ckeditor.com/7156/_samples/api_dialog.html
CKEDITOR.on('dialogDefinition', function(ev)
{
// Take the dialog name and its definition from the event
// data.
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
// Check if the definition is from the dialog we're
// interested on (the "Link" dialog).
if (dialogName == 'link')
{
// Get a reference to the "Link Info" tab.
var infoTab = dialogDefinition.getContents('info');
infoTab.remove('linkType');
}
});
$("#mydiv").ckeditor(function(){}, {
removeDialogTabs: 'link:advanced;link:target'
// any other customizations go here.
});
0
這是我的解決方案:
CKEDITOR.on('dialogDefinition', function (ev) {
// Take the dialog name and its definition from the event data.
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
// Check if the definition is from the dialog we're
// interested in (the 'link' dialog).
if (dialogName == 'link') {
// Remove the 'Target' and 'Advanced' tabs from the 'Link' dialog.
//dialogDefinition.removeContents('target');
//dialogDefinition.removeContents('advanced');
// Get a reference to the 'Link Info' tab.
var infoTab = dialogDefinition.getContents('info');
infoTab.remove('protocol');
infoTab.get('linkType').style = 'display: none';
}
});
如果您擺脫使用infoTab.remove('linkType');
鏈接類型它將無法創建鏈接
相關問題
- 1. 刪除鏈接得到消失點擊編輯鏈接在gridview
- 2. 如何從錨鏈接中刪除點擊事件?
- 3. 從鏈接中刪除「可點擊性」(錨點標記)
- 4. 我如何從ckeditor中刪除鏈接工具欄?
- 5. 如何從鏈接對話框中刪除協議(ckeditor)
- 6. 在點擊magento中的編輯鏈接時刪除特定行
- 7. 從鏈接列表中刪除節點
- 8. 從鏈接列表中刪除節點
- 9. 從鏈接列表中刪除節點
- 10. 從鏈接列表中刪除節點
- 11. 從鏈接列表中刪除節點
- 12. 與ckeditor編輯鏈接的鉻錯誤
- 13. 無法編輯CKEditor上的鏈接
- 14. 刪除鏈接列表中的鏈接
- 15. 如何從鏈接列表中刪除「#」鏈接
- 16. 使用ITextSharp編輯PDF中的超鏈接和錨點
- 17. 如何從鏈接列表中刪除?
- 18. 如何從UIWebView中刪除鏈接?
- 19. 從鏈接服務器中刪除
- 20. 如何刪除ckeditor中的鏈接目標選項?
- 21. 刪除?從鏈接
- 22. 編輯鏈接列表中的節點
- 23. 如何刪除錨鏈接中的基址(codeigniter)?
- 24. 如何刪除下劃線的錨鏈接jQuery中
- 25. CKEditor鏈接對話框刪除協議
- 26. 如何編輯contentEditable div中的鏈接
- 27. 刪除鏈接列表中的節點
- 28. 刪除鏈接列表中的節點
- 29. 刪除鏈接列表中的節點
- 30. 刪除鏈接列表中的節點
只是爲了確保我明白了,你的答案會刪除下拉一起。所以要從下拉列表中只刪除一個選項,我必須刪除現有的選項並添加一個自定義的選項? – montrealmike
我以爲你想讓盒子完全消失。我看到你已經找到了解決問題的方法。 –