在 TinyMCE 3 中,编辑/添加弹出窗口真的很容易,因为它都是纯 HTML。
现在完全不同了,我迷失了每种元素的类型。
我能够通过调试 tinymce.js
和 table plugin
收集所有可能的类型,因为文档缺少所有这些,对于如何构建布局没有任何帮助及其元素。
这将是可能的项目列表:
absolutelayout
button
buttongroup
checkbox
collection
colorbox
colorbutton
colorpicker
combobox
container
control
draghelper
elementpath
factory
fieldset
filepicker
fitlayout
flexlayout
floatpanel
flowlayout
form
formitem
gridlayout
iframe
keyboardnavigation
label
layout
listbox
menu
menubar
menubutton
menuitem
messagebox
movable
panel
panelbutton
path
radio
resizable
resizehandle
scrollable
selector
spacer
splitbutton
stacklayout
tabpanel
textbox
throbber
toolbar
tooltip
widget
window
现在,如果我想创建这样的布局:
(Label -> Input text -> Button)
在一行中,我该怎么做?
我需要修改表格的插件以启用添加背景图像浏览的可能性,我们已经有一个文件管理器,所以当我点击浏览按钮时,我搜索图像并将其插入表格中。
有什么想法吗?提前致谢。
最佳答案
我自己想出来的,这很容易做到。我发布以防万一其他人需要它。
{
layout: 'flow',
name: 'align',
type: 'form',
direction: 'column',
items: [
{
label: 'Background image',
type: 'textbox',
name: 'bgimage'
},
{
type: 'button',
name: 'bgimage',
icon: 'browse',
}
]
},
关于javascript - 如何在 TinyMCE 4 弹出窗口中创建此特定布局?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31185670/