applied my changes - initial import
[boxroom-stian.git] / public / javascripts / tiny_mce / plugins / paste / jscripts / pasteword.js
blobb243a108094a85a4168f015204cecc6a7f01949f
1 function saveContent() {
2 var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
4 if (html == ''){
5 tinyMCEPopup.close();
6 return false;
9 tinyMCEPopup.execCommand('mcePasteWord', false, html);
10 tinyMCEPopup.close();
13 function onLoadInit() {
14 tinyMCEPopup.resizeToInnerSize();
16 // Fix for endless reloading in FF
17 window.setTimeout('createIFrame();', 10);
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>';
24 var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
26 function initIframe(doc) {
27 var dir = tinyMCE.selectedInstance.settings['directionality'];
29 doc.body.dir = dir;
31 // Remove Gecko spellchecking
32 if (tinyMCE.isGecko)
33 doc.body.spellcheck = tinyMCE.getParam("gecko_spellcheck");
35 resizeInputs();
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;
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';