如何在windowmanager中添加tinymce列表框值 [英] how to add tinymce listbox values in windowmanager
本文介绍了如何在windowmanager中添加tinymce列表框值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我打开一个windowmanager并添加一个textfield和listbox:
I open up a windowmanager and add a textfield and listbox:
editor.windowManager.open({
title: 'Insert caption',
body: [
{type: 'textbox', name: 'text', label: 'text', 'multiline': 'true', 'minWidth': 450, 'minHeight': 100},
{type: 'listbox', name: 'align', label: 'align', 'values': ['pull-left','pull-right']}
],
显示列表框,但不显示值。在文档中( http://www.tinymce.com/wiki.php/api4:class.tinymce.ui。 ListBox )它声明:数组中包含要添加到列表框的值。
The listbox is displayed, but not the values. In the documentation (http://www.tinymce.com/wiki.php/api4:class.tinymce.ui.ListBox) it states: "Array with values to add to list box."
我做错了什么?
推荐答案
我在官方TinyMCE插件中搜索时发现了。所以这就是它的完成方式:
I found out while searching in the official TinyMCE plugins. So this is how it's done:
{type: 'listbox',
name: 'align',
label: 'align',
'values': [
{text: 'Left', value: 'left'},
{text: 'Right', value: 'right'},
{text: 'Center', value: 'center'}
]
}
这篇关于如何在windowmanager中添加tinymce列表框值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文