I almost have my Tinymce plugin working properly to pull all shortcodes from Wordpress and display them in a popup window, which can then be selected and inserted into the content editor.
Here is part of my tinymce .js file:
insert : function(file, title) {
var ed = tinyMCEPopup.editor, dom = ed.dom;
tinyMCEPopup.execCommand('mceInsertContent', false, '$tagname');
tinyMCEPopup.close();
And here is my part of my .php file being called for the popup:
foreach($shortcode_tags as $tagname=>$tag)
echo "<div><table id='emoticon_table'><tr><td><input type='radio' onclick=doInsert('[".$tagname."]') name='[".$tagname."]' value='[".$tagname."]' /><a class='emoticon_link' id='[".$tagname."]'>[$tagname]</a></td></tr></table></div>";
So, the list displays as radio buttons, which can be selected, and then inserted.
The problem is what is being inserted back into the content editor. As you can see above from mceInsertContent, all that is appearing back in the editor is the literal $tagname.
What I'd like to insert is the actual value of the input (or it's id, class, or alt name) as I can set those in php too.
But how do I insert the variables value back into the content area from the tinymce modal window?
Can I use a global $tagname in .js or something?
Thank you.