6

I'm looking at this example w.r.t creating tinyMCE plugin. What I want to do is to open a popup, and the content inside the popup is specified programmatically, without having to load a physical page at certain url:

Add an input element of type=file in tinymce container

Basically the author solved the issue about a plugin he was trying to create. I'm trying the same code but the popup is completely empty for me, no errors, any suggestions? Where can I find info about the "body" parameter when calling "windowManager.open", like:

// Open window
editor.windowManager.open({
    title: 'Example plugin',
    body: [{
        type: 'textbox',
        name: 'code',
        label: 'Video code'
    }],
...
Community
  • 1
  • 1
John Jiang
  • 171
  • 2
  • 5

1 Answers1

2

Try giving the textbox a size:

   // Open window
  editor.windowManager.open(
    {title: 'Example plugin',
     body: [
            {   type: 'textbox',
                size: 40,
                name: 'code',
                label: 'Video code'
             }
           ],
     .....
Thariama
  • 50,002
  • 13
  • 138
  • 166
  • Thank you Thariama! I added the line, but it is still empty. Actually I'm using tinyMCE 3.5.8. In the article I mentioned the author uses tinyMCE 4.0.6 (2013-09-12), not sure what difference that will make... Best Regards, John. – John Jiang Apr 11 '14 at 14:00
  • looks like I have the domain relaxing issue in the popup - the main page is domain-relaxed, but not the "iframe" of the popup. In new version of tinyMCE, there is no "iframe", but a "div". – John Jiang Apr 11 '14 at 19:10
  • well, you can eighter use the new tinymce4 or make sure the domains match – Thariama Apr 22 '14 at 07:23