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