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