--- /dev/null
+tinyMCEPopup.requireLangPack();\r
+\r
+function saveContent() {\r
+ var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;\r
+\r
+ if (html == ''){\r
+ tinyMCEPopup.close();\r
+ return false;\r
+ }\r
+\r
+ tinyMCEPopup.execCommand('mcePasteWord', false, html);\r
+ tinyMCEPopup.close();\r
+}\r
+\r
+function onLoadInit() {\r
+ tinyMCEPopup.resizeToInnerSize();\r
+\r
+ // Fix for endless reloading in FF\r
+ window.setTimeout(createIFrame, 10);\r
+}\r
+\r
+function createIFrame() {\r
+ 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
+}\r
+\r
+var wHeight=0, wWidth=0, owHeight=0, owWidth=0;\r
+\r
+function initIframe(doc) {\r
+ var dir = tinyMCEPopup.editor.settings.directionality;\r
+\r
+ doc.body.dir = dir;\r
+\r
+ // Remove Gecko spellchecking\r
+ if (tinymce.isGecko)\r
+ doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");\r
+\r
+ resizeInputs();\r
+}\r
+\r
+function resizeInputs() {\r
+ if (!tinymce.isIE) {\r
+ wHeight = self.innerHeight - 80;\r
+ wWidth = self.innerWidth - 18;\r
+ } else {\r
+ wHeight = document.body.clientHeight - 80;\r
+ wWidth = document.body.clientWidth - 18;\r
+ }\r
+\r
+ var elm = document.getElementById('frmData');\r
+ if (elm) {\r
+ elm.style.height = Math.abs(wHeight) + 'px';\r
+ elm.style.width = Math.abs(wWidth) + 'px';\r
+ }\r
+}\r
+\r
+tinyMCEPopup.onInit.add(onLoadInit);\r