adicionando arquivos de media (incluindo o editor tiny mce (LGPL)
[cascardo/eventmanager.git] / media / tiny_mce / plugins / paste / jscripts / pastetext.js
diff --git a/media/tiny_mce/plugins/paste/jscripts/pastetext.js b/media/tiny_mce/plugins/paste/jscripts/pastetext.js
new file mode 100755 (executable)
index 0000000..4c07691
--- /dev/null
@@ -0,0 +1,38 @@
+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 = tinyMCE.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.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