How do I create this specific layout in the TinyMCE 4 popup?

Back in TinyMCE 3 it was really easy to edit / add popups because it was plain HTML. Now things are different and I'm at a loss on what type of items each one is. I was able to collect all possible types by debugging tinymce.js

and table plugin

because the documentation lacks all of this, there is no help on how to create layouts and their elements.

This will be a list of possible elements:

absolutelayout
button
buttongroup
checkbox
collection
colorbox
colorbutton
colorpicker
combobox
container
control
draghelper
elementpath
factory
fieldset
filepicker
fitlayout
flexlayout
floatpanel
flowlayout
form
formitem
gridlayout
iframe
keyboardnavigation
label
layout
listbox
menu
menubar
menubutton
menuitem
messagebox
movable
panel
panelbutton
path
radio
resizable
resizehandle
scrollable
selector
spacer
splitbutton
stacklayout
tabpanel
textbox
throbber
toolbar
tooltip
widget
window

      

Now if I want to create a layout like:

(Label -> Input text -> Button)

in one line, how can I do this?

I need to modify the table plugin to enable the ability to add a background image, we already have a file manager, so when I click the Browse button, I browse the image and insert it into the table.

Any ideas? Thanks in advance.

+3


source to share


1 answer


I figured it out myself, it was easy to do. I am posting in case anyone needs it.



{
                        layout: 'flow',
                        name: 'align',
                        type: 'form',
                        direction: 'column',
                        items: [
                                {
                                    label: 'Background image',
                                    type: 'textbox',
                                    name: 'bgimage'                                 
                                },
                                {
                                    type: 'button',
                                    name: 'bgimage',
                                    icon: 'browse',                                 
                                }
                            ]

                    },

      

+2


source







All Articles