4
我使用TinyMCE的一個嘗試擴展插件,以顯示與特定佈局的對話框:tinymce.ui簡單的文字組成
editor.windowManager.open({
title: 'Title of my dialog',
body: [
{type: 'label', text: 'my label'},
{ name:'my_input', type: 'textbox'},
// { type: 'text', html:'some content with <b>bold</b> if posilbe!'},
// { type: 'html', value:'<div>with custom formating</div>'}
]
}
我檢查了該文檔tinymce.ui幾次,但可以找到一種方法,在對話框的構造函數中添加html或文本組件(如示例中的註釋行)。
我知道有一個選項使用對話框的準備HTML模板..但也有很多事件和觸發器,所以使用構造函數和.ui組件更適合我的情況。