]> code.citadel.org Git - citadel.git/blob - webcit/tiny_mce/plugins/paste/jscripts/pasteword.js
Test to see if log is updated automatically
[citadel.git] / webcit / tiny_mce / plugins / paste / jscripts / pasteword.js
1 function saveContent() {
2         var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
3
4         if (html == ''){
5                 tinyMCEPopup.close();
6                 return false;
7         }
8
9         tinyMCEPopup.execCommand('mcePasteWord', false, html);
10         tinyMCEPopup.close();
11 }
12
13 function onLoadInit() {
14         tinyMCEPopup.resizeToInnerSize();
15
16         // Fix for endless reloading in FF
17         window.setTimeout('createIFrame();', 10);
18 }
19
20 function createIFrame() {
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>';
22 }
23
24 var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
25
26 function initIframe(doc) {
27         var dir = tinyMCE.selectedInstance.settings['directionality'];
28         doc.body.dir = dir;
29         resizeInputs();
30 }
31
32 function resizeInputs() {
33         if (!tinyMCE.isMSIE) {
34                 wHeight = self.innerHeight - 80;
35                 wWidth = self.innerWidth - 18;
36         } else {
37                 wHeight = document.body.clientHeight - 80;
38                 wWidth = document.body.clientWidth - 18;
39         }
40
41         document.getElementById('frmData').style.height = Math.abs(wHeight) + 'px';
42         document.getElementById('frmData').style.width  = Math.abs(wWidth) + 'px';
43 }