I am trying to create form with some common inputs
<input type="text">
Now, I need to create textarea input because of more text input
<textarea>
I have not found any post about that. My code is bellow. Thanks for advices.
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.
went through the same problem, you can use the following example:
{
type: 'textbox',
multiline: true
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With