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