TinyMCE API v4 windowManager.open-我可以为body选项配置哪些小部件? [英] TinyMCE API v4 windowManager.open - What widgets can I configure for the body option?

查看:145
本文介绍了TinyMCE API v4 windowManager.open-我可以为body选项配置哪些小部件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Java生成的自定义HTML填充模式对话框的主体.

I would like to fill the body of a modal dialog with custom HTML, generated by Javascript.

该方法的文档大部分为空.

The documentation for this method is mostly empty.

我仅找到

是否有可用类型的文档?更具体地说,是否有一种类型可以从Javascript变量向对话框的主体添加常规标记?

Is there a documentation for the available types? More specifically, is there a type to add general markup to the body of a dialog from a Javascript variable?

推荐答案

在美化了tinymce的缩小版本之后,我发现这些可能是windowManager.open的某些主体类型.我不确定如何使用它们,因为所有这些信息都是通过试验和失败收集的.由于文档确实很糟糕,因此无法收集实际信息.另外,这里的链接还包含一些有关复选框的良好信息.

After I beautified the minified version of tinymce, i found that these may be some of the body types for windowManager.open. I'm not sure how to use them all, as all this info was gathered through trial and fail. Since the documentation is really bad, no real info can be gathered. Also here's a link which includes some good info on checkbox.

https://wordpress.stackexchange.com /questions/172853/how-disable-checkbox-when-listbox-value-changes-in-tinymce

我花了一个小时左右的时间来检查和测试所有内容,因此,我真的希望这可以节省您自己进行操作的麻烦.

It took me an hour or so to check and test all so I really hope this will save you the trouble of doing it yourself.

LE:文本框参数:文本框设置表

LE: textbox params: textbox settings table

https://www.tiny. cloud/docs-4x/api/tinymce.ui/tinymce.ui.textbox/

LE2:您可以尝试浏览下面提到的所有tinymce.ui.*元素,并检查它是否具有设置表,我认为如果有的话,它可以用作身体的有效参数

LE2: you can try and browse all the tinymce.ui.* elements mentioned down and check if it has a settings table, I think it may be used as a valid parameter for body if they have it

LE3:这是旧文档 http://archive.tinymce .com/wiki.php/api4:index ,因为它比新版本更有用,它是目前唯一可用的文档 https://www.tinymce.com/docs/api/

LE3: this is the old documentation http://archive.tinymce.com/wiki.php/api4:index, since it's more useful than the new one it's the only documentation available now https://www.tinymce.com/docs/api/

                {
                    type   : 'listbox',
                    name   : 'listbox',
                    label  : 'listbox',
                    values : [
                        { text: 'Test1', value: 'test1' },
                        { text: 'Test2', value: 'test2' },
                        { text: 'Test3', value: 'test3' }
                    ],
                    value : 'test2' // Sets the default
                },
                {
                    type   : 'combobox',
                    name   : 'combobox',
                    label  : 'combobox',
                    values : [
                        { text: 'Test', value: 'test' },
                        { text: 'Test2', value: 'test2' }
                    ]
                },
                {
                    type   : 'textbox',
                    name   : 'textbox',
                    label  : 'textbox',
                    tooltip: 'Some nice tooltip to use',
                    value  : 'default value'
                },
                {
                    type   : 'container',
                    name   : 'container',
                    label  : 'container',
                    html   : '<h1>container<h1> is <i>ANY</i> html i guess...<br/><br/><pre>but needs some styling?!?</pre>'
                },
                {
                    type   : 'tooltip',
                    name   : 'tooltip',
                    label  : 'tooltip ( you dont use it like this check textbox params )'
                },
                {
                    type   : 'button',
                    name   : 'button',
                    label  : 'button ( i dont know the other params )',
                    text   : 'My Button'
                },
                {
                    type   : 'buttongroup',
                    name   : 'buttongroup',
                    label  : 'buttongroup ( i dont know the other params )',
                    items  : [
                        { text: 'Button 1', value: 'button1' },
                        { text: 'Button 2', value: 'button2' }
                    ]
                },
                {
                    type   : 'checkbox',
                    name   : 'checkbox',
                    label  : 'checkbox ( it doesn`t seem to accept more than 1 )',
                    text   : 'My Checkbox',
                    checked : true
                },
                {
                    type   : 'colorbox',
                    name   : 'colorbox',
                    label  : 'colorbox ( i have no idea how it works )',
                    // text   : '#fff',
                    values : [
                        { text: 'White', value: '#fff' },
                        { text: 'Black', value: '#000' }
                    ]
                },
                {
                    type   : 'panelbutton',
                    name   : 'panelbutton',
                    label  : 'panelbutton ( adds active state class to it,visible only on hover )',
                    text   : 'My Panel Button'
                },
                {
                    type   : 'colorbutton',
                    name   : 'colorbutton',
                    label  : 'colorbutton ( no idea... )',
                    // text   : 'My colorbutton'
                },
                {
                    type   : 'colorpicker',
                    name   : 'colorpicker',
                    label  : 'colorpicker'
                },
                {
                    type   : 'radio',
                    name   : 'radio',
                    label  : 'radio ( defaults to checkbox, or i`m missing something )',
                    text   : 'My Radio Button'
                }

这篇关于TinyMCE API v4 windowManager.open-我可以为body选项配置哪些小部件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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