About the “body” parameter for tinymce's “windowManager.open” method

谁说胖子不能爱 提交于 2019-12-07 03:09:53

问题


I'm looking at this example w.r.t creating tinyMCE plugin. What I want to do is to open a popup, and the content inside the popup is specified programmatically, without having to load a physical page at certain url:

Add an input element of type=file in tinymce container

Basically the author solved the issue about a plugin he was trying to create. I'm trying the same code but the popup is completely empty for me, no errors, any suggestions? Where can I find info about the "body" parameter when calling "windowManager.open", like:

// Open window
editor.windowManager.open({
    title: 'Example plugin',
    body: [{
        type: 'textbox',
        name: 'code',
        label: 'Video code'
    }],
...

回答1:


Try giving the textbox a size:

   // Open window
  editor.windowManager.open(
    {title: 'Example plugin',
     body: [
            {   type: 'textbox',
                size: 40,
                name: 'code',
                label: 'Video code'
             }
           ],
     .....


来源:https://stackoverflow.com/questions/22991660/about-the-body-parameter-for-tinymces-windowmanager-open-method

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!