diff options
| author | hukl <contact@smyck.org> | 2009-02-17 21:54:39 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-02-17 21:54:39 +0100 |
| commit | f61b5b0597e0c25f084ee67d402f12a43a7a9947 (patch) | |
| tree | 3b4c3f9f38637f1a7ecf703ece4fd3bc4c6e2934 /public/javascripts/tiny_mce/plugins/example/js | |
| parent | 3d3b786cc43266f6292f5edd25733dbb9bd6ed06 (diff) | |
added tinymce editor for body area of pages
Diffstat (limited to 'public/javascripts/tiny_mce/plugins/example/js')
| -rwxr-xr-x | public/javascripts/tiny_mce/plugins/example/js/dialog.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/public/javascripts/tiny_mce/plugins/example/js/dialog.js b/public/javascripts/tiny_mce/plugins/example/js/dialog.js new file mode 100755 index 0000000..fa83411 --- /dev/null +++ b/public/javascripts/tiny_mce/plugins/example/js/dialog.js | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | tinyMCEPopup.requireLangPack(); | ||
| 2 | |||
| 3 | var ExampleDialog = { | ||
| 4 | init : function() { | ||
| 5 | var f = document.forms[0]; | ||
| 6 | |||
| 7 | // Get the selected contents as text and place it in the input | ||
| 8 | f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); | ||
| 9 | f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); | ||
| 10 | }, | ||
| 11 | |||
| 12 | insert : function() { | ||
| 13 | // Insert the contents from the input into the document | ||
| 14 | tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); | ||
| 15 | tinyMCEPopup.close(); | ||
| 16 | } | ||
| 17 | }; | ||
| 18 | |||
| 19 | tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); | ||
