关于“身体"tinymce 的“windowManager.open"参数方法 [英] About the "body" parameter for tinymce's "windowManager.open" method

查看:29
本文介绍了关于“身体"tinymce 的“windowManager.open"参数方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看这个示例 w.r.t 创建 tinyMCE 插件.我想做的是打开一个弹窗,弹窗内的内容以编程方式指定,无需在某个 url 加载物理页面:

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:

添加输入元素 type=file intinymce 容器

基本上,作者解决了他试图创建的插件的问题.我正在尝试相同的代码,但弹出窗口对我来说完全是空的,没有错误,有什么建议吗?调用windowManager.open"时在哪里可以找到有关body"参数的信息,例如:

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'
    }],
...

推荐答案

尝试给文本框一个大小:

Try giving the textbox a size:

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

这篇关于关于“身体"tinymce 的“windowManager.open"参数方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆