]> code.citadel.org Git - citadel.git/blobdiff - webcit/tiny_mce/plugins/paste/jscripts/pastetext.js
webcit_before_automake is now the trunk
[citadel.git] / webcit / tiny_mce / plugins / paste / jscripts / pastetext.js
diff --git a/webcit/tiny_mce/plugins/paste/jscripts/pastetext.js b/webcit/tiny_mce/plugins/paste/jscripts/pastetext.js
new file mode 100644 (file)
index 0000000..927745b
--- /dev/null
@@ -0,0 +1,34 @@
+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
+       resizeInputs();\r
+}\r
+\r
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;\r
+\r
+function resizeInputs() {\r
+       if (!tinyMCE.isMSIE) {\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