]> code.citadel.org Git - citadel.git/blob - webcit/tiny_mce/plugins/paste/js/pastetext.js
* Re-added tiny_mce, this time with the language packs
[citadel.git] / webcit / tiny_mce / plugins / paste / js / pastetext.js
1 tinyMCEPopup.requireLangPack();\r
2 \r
3 function saveContent() {\r
4         if (document.forms[0].htmlSource.value == '') {\r
5                 tinyMCEPopup.close();\r
6                 return false;\r
7         }\r
8 \r
9         tinyMCEPopup.execCommand('mcePasteText', false, {\r
10                 html : document.forms[0].htmlSource.value,\r
11                 linebreaks : document.forms[0].linebreaks.checked\r
12         });\r
13 \r
14         tinyMCEPopup.close();\r
15 }\r
16 \r
17 function onLoadInit() {\r
18         tinyMCEPopup.resizeToInnerSize();\r
19 \r
20         // Remove Gecko spellchecking\r
21         if (tinymce.isGecko)\r
22                 document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");\r
23 \r
24         resizeInputs();\r
25 }\r
26 \r
27 var wHeight=0, wWidth=0, owHeight=0, owWidth=0;\r
28 \r
29 function resizeInputs() {\r
30         if (!tinymce.isIE) {\r
31                 wHeight = self.innerHeight-80;\r
32                 wWidth = self.innerWidth-17;\r
33         } else {\r
34                 wHeight = document.body.clientHeight-80;\r
35                 wWidth = document.body.clientWidth-17;\r
36         }\r
37 \r
38         document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';\r
39         document.forms[0].htmlSource.style.width  = Math.abs(wWidth) + 'px';\r
40 }\r
41 \r
42 tinyMCEPopup.onInit.add(onLoadInit);