]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/js/tiny_mce/plugins/paste/js/pastetext.js
Imported Upstream version 0.2~alpha
[roundcube.git] / program / js / tiny_mce / plugins / paste / js / pastetext.js
diff --git a/program/js/tiny_mce/plugins/paste/js/pastetext.js b/program/js/tiny_mce/plugins/paste/js/pastetext.js
new file mode 100644 (file)
index 0000000..326bb16
--- /dev/null
@@ -0,0 +1,42 @@
+tinyMCEPopup.requireLangPack();\r
+\r
+function saveContent() {\r
+       if (document.forms[0].htmlSource.value == '') {\r
+               tinyMCEPopup.close();\r
+               return false;\r
+       }\r
+\r
+       tinyMCEPopup.execCommand('mcePasteText', false, {\r
+               html : document.forms[0].htmlSource.value,\r
+               linebreaks : document.forms[0].linebreaks.checked\r
+       });\r
+\r
+       tinyMCEPopup.close();\r
+}\r
+\r
+function onLoadInit() {\r
+       tinyMCEPopup.resizeToInnerSize();\r
+\r
+       // Remove Gecko spellchecking\r
+       if (tinymce.isGecko)\r
+               document.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");\r
+\r
+       resizeInputs();\r
+}\r
+\r
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;\r
+\r
+function resizeInputs() {\r
+       if (!tinymce.isIE) {\r
+               wHeight = self.innerHeight-80;\r
+               wWidth = self.innerWidth-17;\r
+       } else {\r
+               wHeight = document.body.clientHeight-80;\r
+               wWidth = document.body.clientWidth-17;\r
+       }\r
+\r
+       document.forms[0].htmlSource.style.height = Math.abs(wHeight) + 'px';\r
+       document.forms[0].htmlSource.style.width  = Math.abs(wWidth) + 'px';\r
+}\r
+\r
+tinyMCEPopup.onInit.add(onLoadInit);
\ No newline at end of file