From 4766f36a4d74924f21ff329c4318ce4e069ffa04 Mon Sep 17 00:00:00 2001 From: brettp Date: Wed, 3 Mar 2010 17:53:05 +0000 Subject: Pulled in the interface changes. git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544 --- .../jscripts/tiny_mce/plugins/example/js/dialog.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mod/tinymce/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js (limited to 'mod/tinymce/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js') diff --git a/mod/tinymce/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js b/mod/tinymce/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js new file mode 100644 index 000000000..a7ee507e0 --- /dev/null +++ b/mod/tinymce/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js @@ -0,0 +1,19 @@ +tinyMCEPopup.requireLangPack(); + +var ExampleDialog = { + init : function() { + var f = document.forms[0]; + + // Get the selected contents as text and place it in the input + f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); + f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); + }, + + insert : function() { + // Insert the contents from the input into the document + tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); + tinyMCEPopup.close(); + } +}; + +tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); -- cgit v1.2.3