How do I get the values from my TinyMCE plugin back?

Viewed 4002

I'm in the process of making an extra button on the TinyMCE toolbar (it's for Wordpress but I don't think that matters).

Button is pressed and a form is shown, I'm just at a total loss in configuring it so that the values entered on the form are actually transmitted into the rest of the tinyMce plugin.

The only relevant docs I have found is this page where they show you to implement a custom browser. But it's rather cryptic for a first timer (or at least for me).

Here's what I have:

This is executed when the button is pressed:

ed.windowManager.open({
    file : url + '/dialog.html',
    width : 400,
    height : 120,
    inline : 1
}, {
    plugin_url : url, // Plugin absolute URL
    some_custom_arg : 'custom arg' // Custom argument
});

This is the contents of the dialog.html file

<html>
<head>
<title>Hello world!</title>
</head>
<body>
<form name="Hello world" method="post">
        <input size="30" name="textbox1"  type="text" id="textbox1" />
        <input type="submit" value="" name="submitbutton" />
    </form>
</body>
</html>

Obviously this does nothing (not even close the dialog), but I don't really know where to start looking for it to do something.

2 Answers
Related