How to add tinymce list values ​​to windowmanager

I open the window manager and add a text box and a list:

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

A list is displayed, but not a value. The documentation ( http://www.tinymce.com/wiki.php/api4:class.tinymce.ui.ListBox ) says: "An array with values ​​to add to the list."

What am I doing wrong?

+8
javascript tinymce-4
source share
1 answer

I found out when searching in the official TinyMCE plugins. So here is how to do it:

 {type: 'listbox', name: 'align', label: 'align', 'values': [ {text: 'Left', value: 'left'}, {text: 'Right', value: 'right'}, {text: 'Center', value: 'center'} ] } 
+14
source share

All Articles