Mercurial > public > sg101
annotate static/js/tiny_mce/plugins/example/js/dialog.js @ 498:b137a0966e4b
Removed the warning about AT&T and sbcglobal on the registration page. Added "text" classes to the registration text widgets.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 24 Nov 2011 21:27:07 +0000 |
parents | 88b2b9cb8c1f |
children |
rev | line source |
---|---|
bgneal@312 | 1 tinyMCEPopup.requireLangPack(); |
bgneal@312 | 2 |
bgneal@312 | 3 var ExampleDialog = { |
bgneal@312 | 4 init : function() { |
bgneal@312 | 5 var f = document.forms[0]; |
bgneal@312 | 6 |
bgneal@312 | 7 // Get the selected contents as text and place it in the input |
bgneal@312 | 8 f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'}); |
bgneal@312 | 9 f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg'); |
bgneal@312 | 10 }, |
bgneal@312 | 11 |
bgneal@312 | 12 insert : function() { |
bgneal@312 | 13 // Insert the contents from the input into the document |
bgneal@312 | 14 tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value); |
bgneal@312 | 15 tinyMCEPopup.close(); |
bgneal@312 | 16 } |
bgneal@312 | 17 }; |
bgneal@312 | 18 |
bgneal@312 | 19 tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog); |