bgneal@45: tinyMCEPopup.requireLangPack(); bgneal@45: bgneal@45: var ExampleDialog = { bgneal@45: init : function() { bgneal@45: var f = document.forms[0]; bgneal@45: bgneal@45: // Get the selected contents as text and place it in the input bgneal@45: f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); bgneal@45: f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); bgneal@45: }, bgneal@45: bgneal@45: insert : function() { bgneal@45: // Insert the contents from the input into the document bgneal@45: tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); bgneal@45: tinyMCEPopup.close(); bgneal@45: } bgneal@45: }; bgneal@45: bgneal@45: tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog);