source: trunk/web/app/plugins/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js @ 1

Last change on this file since 1 was 1, checked in by dj3c1t, 12 years ago

import initial

File size: 1.4 KB
Line 
1tinyMCEPopup.requireLangPack();
2
3function saveContent() {
4        var html = document.getElementById("frmData").contentWindow.document.body.innerHTML;
5
6        if (html == ''){
7                tinyMCEPopup.close();
8                return false;
9        }
10
11        tinyMCEPopup.execCommand('mcePasteWord', false, html);
12        tinyMCEPopup.close();
13}
14
15function onLoadInit() {
16        tinyMCEPopup.resizeToInnerSize();
17
18        // Fix for endless reloading in FF
19        window.setTimeout('createIFrame();', 10);
20}
21
22function createIFrame() {
23        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}
25
26var wHeight=0, wWidth=0, owHeight=0, owWidth=0;
27
28function initIframe(doc) {
29        var dir = tinyMCEPopup.editor.settings.directionality;
30
31        doc.body.dir = dir;
32
33        // Remove Gecko spellchecking
34        if (tinymce.isGecko)
35                doc.body.spellcheck = tinyMCEPopup.getParam("gecko_spellcheck");
36
37        resizeInputs();
38}
39
40function resizeInputs() {
41        if (!tinymce.isIE) {
42                wHeight = self.innerHeight - 80;
43                wWidth = self.innerWidth - 18;
44        } else {
45                wHeight = document.body.clientHeight - 80;
46                wWidth = document.body.clientWidth - 18;
47        }
48
49        var elm = document.getElementById('frmData');
50        if (elm) {
51                elm.style.height = Math.abs(wHeight) + 'px';
52                elm.style.width  = Math.abs(wWidth) + 'px';
53        }
54}
55
56tinyMCEPopup.onInit.add(onLoadInit);
Note: See TracBrowser for help on using the repository browser.