• Hi, I just start creating my very first editor plugin, and I have one question.

    I register my own button for editor, and add filter for “mce_external_plugin”. After that in my_plugin.js file I create tinymce windowManager and I load my own custom_window.php file inside that popup window.

    My question is, how can I pass selected text to my custom_window.php file?

    I know that I can get it inside my_plugin.js file with this code:

    tinyMCE.activeEditor.selection.getContent();

    …and I can add this:

    ed.windowManager.open({
    title : 'My Plugin',
    file : url + '/custom_window.php',
    width : 500,
    height : 400,
    inline : 1
    }, {
    plugin_url : url,
    my_args : 'my custom args'
    });

    How can I get this value “my custom args” inside custom_window.php ?

    Also, can I add my own tinymce editor in custom_window.php and how?

    And at the end, how can I send back to my_plugin.js modified content (to insert in main post editor)?

    Cheers

Viewing 1 replies (of 1 total)
  • ed.windowManager.open({
    title : ‘My Plugin’,
    file : url + ‘/custom_window.php?my_args=mycustomargs’,
    width : 500,
    height : 400,
    inline : 1
    }, {
    plugin_url : url
    });

Viewing 1 replies (of 1 total)
  • The topic ‘WP and TinyMCE in the popup window’ is closed to new replies.