1
|
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 |
|
|
29 |
doc.body.dir = dir;
|
|
30 |
|
|
31 |
// Remove Gecko spellchecking
|
|
32 |
if (tinyMCE.isGecko)
|
|
33 |
doc.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
|
|
34 |
|
|
35 |
resizeInputs();
|
|
36 |
}
|
|
37 |
|
|
38 |
function resizeInputs() {
|
|
39 |
if (!tinyMCE.isMSIE) {
|
|
40 |
wHeight = self.innerHeight - 80;
|
|
41 |
wWidth = self.innerWidth - 18;
|
|
42 |
} else {
|
|
43 |
wHeight = document.body.clientHeight - 80;
|
|
44 |
wWidth = document.body.clientWidth - 18;
|
|
45 |
}
|
|
46 |
|
|
47 |
var elm = document.getElementById('frmData');
|
|
48 |
if (elm) {
|
|
49 |
elm.style.height = Math.abs(wHeight) + 'px';
|
|
50 |
elm.style.width = Math.abs(wWidth) + 'px';
|
|
51 |
}
|
|
52 |
}
|