Now I need to create an entry in textarea due ...">

TinyMCE modal texture

I am trying to create a form with some common inputs

<input type="text"> 

Now I need to create an entry in textarea due to more text input

 <textarea> 

I did not find any posts about this. My code is below. Thanks for the tips.

 function(editor, type, name) { editor.windowManager.open( { title: 'Advert type: ' + name, body: [ { type: 'textbox', name: 'target', label: 'Target', autofocus: true }, { type: 'checkbox', name: 'blank', checked: true, label: 'Open in new tab' }, { type: 'textbox', name: 'text', label: 'Main text', minWidth: '600', }, { type: 'listbox', name: 'align', label: 'Text align', maxWidth: 100, values: [ { text: 'Left', value: 'left', icon: 'icon dashicons-align-left' }, { text: Right', value: 'right', icon: 'icon dashicons-align-right' }, { text: 'Cenetr', value: 'center', icon: 'icon dashicons-align-center'} ] } ], onsubmit: function(e) { editor.insertContent('[widget widget_name="TinyMCEAdvWidget" type="' + type + '" target="' + makeTarget(e.data.target) + '" blank="' + e.data.blank + '" text="' + e.data.text + '" align="' + e.data.align + '"]'); } }); } 

I would like to display the main text as textarea col = 3.

+5
source share
1 answer

went through the same problem, you can use the following example:

 { type: 'textbox', multiline: true } 
+7
source

All Articles