]> code.citadel.org Git - citadel.git/blob - webcit/tiny_mce/plugins/paste/jscripts/pasteword.js
* serv_ldap.c: upon successful connect to an LDAP server, post an aide message warnin...
[citadel.git] / webcit / tiny_mce / plugins / paste / jscripts / pasteword.js
1 function saveContent() {\r
2         var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;\r
3 \r
4         if (html == ''){\r
5                 tinyMCEPopup.close();\r
6                 return false;\r
7         }\r
8 \r
9         tinyMCEPopup.execCommand('mcePasteWord', false, html);\r
10         tinyMCEPopup.close();\r
11 }\r
12 \r
13 function onLoadInit() {\r
14         tinyMCEPopup.resizeToInnerSize();\r
15 \r
16         // Fix for endless reloading in FF\r
17         window.setTimeout('createIFrame();', 10);\r
18 }\r
19 \r
20 function createIFrame() {\r
21         document.getElementById('iframecontainer').innerHTML = '<iframe id="frmData" name="frmData" class="sourceIframe" src="blank.htm" height="280" width="400" frameborder="0" style="background-color:#FFFFFF; width:100%;" dir="ltr" wrap="soft"></iframe>';\r
22 }\r
23 \r
24 var wHeight=0, wWidth=0, owHeight=0, owWidth=0;\r
25 \r
26 function initIframe(doc) {\r
27         var dir = tinyMCE.selectedInstance.settings['directionality'];\r
28 \r
29         doc.body.dir = dir;\r
30 \r
31         // Remove Gecko spellchecking\r
32         if (tinyMCE.isGecko)\r
33                 doc.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");\r
34 \r
35         resizeInputs();\r
36 }\r
37 \r
38 function resizeInputs() {\r
39         if (!tinyMCE.isMSIE) {\r
40                 wHeight = self.innerHeight - 80;\r
41                 wWidth = self.innerWidth - 18;\r
42         } else {\r
43                 wHeight = document.body.clientHeight - 80;\r
44                 wWidth = document.body.clientWidth - 18;\r
45         }\r
46 \r
47         var elm = document.getElementById('frmData');\r
48         if (elm) {\r
49                 elm.style.height = Math.abs(wHeight) + 'px';\r
50                 elm.style.width  = Math.abs(wWidth) + 'px';\r
51         }\r
52 }\r