模式形式的TinyMCE textarea

Mak*_*Buk 5 wordpress textarea tinymce modal-dialog

我试图用一些常见的输入创建表单

<input type="text">
Run Code Online (Sandbox Code Playgroud)

现在,我需要创建textarea输入,因为更多的文本输入

<textarea>
Run Code Online (Sandbox Code Playgroud)

我没有发现任何关于此的帖子.我的代码是吼叫.谢谢你的建议.

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 + '"]');
        }
    });
}
Run Code Online (Sandbox Code Playgroud)

我想将主文本显示为textarea col = 3.

小智 8

经历了同样的问题,您可以使用以下示例:

{
  type: 'textbox',
  multiline: true
}
Run Code Online (Sandbox Code Playgroud)