0
在我的自定義tinyme插件我想呈現一個窗口,其中2個選項卡:與文件輸入TinyMCE的彈出窗口CONTROLL鍵入
- 一個與URL輸入
- 一個與fuile上傳
,沒有工作的代碼是:
tinymce.PluginManager.add('upload', function(ed, url){
ed.addCommand('initUpload', function(){
//Do stuff
});
//Register a button that open a window
ed.addButton('upload', {
title: 'Upload Files into the editor',
// cmd: 'initUpload',
text: '',
icon:'upload-icon',
onClick: function(){
ed.windowManager.open({
title:'Insert a File',
bodyType:'tabpanel',
body:[
{
title: "From file into your computer",
type:"textbox",//Thing That I need to change with file input
label:"File"
},
{
title: "From Url",
type:"textbox",
label:"Url"
},
],
onsubmit: function(e) {
//do Stuff
}
})
}
});
});
我試圖取代:
{
title: "From file into your computer",
type:"textbox",//Thing That I need to change with file input
label:"File"
},
有了:
{
title: "From file into your computer",
type:"file",//Thing That I need to change with file input
label:"File"
},
但出於某種原因,我得到:
Error: Could not find control by type: file
所以,我怎麼能設置一個文件控制研究型到TinyMCE的呈現彈出窗口?