mise a jour pour mtweb.0.9.0
[mw_pages] / app / out / default / tiny_mce / plugins / example / js / dialog.js
diff --git a/app/out/default/tiny_mce/plugins/example/js/dialog.js b/app/out/default/tiny_mce/plugins/example/js/dialog.js
new file mode 100644 (file)
index 0000000..fa83411
--- /dev/null
@@ -0,0 +1,19 @@
+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