@lingxiteam/lcdp-ueditor-react 1.0.0-alpha.8 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/LcdpUeditor.js +64 -61
- package/es/const.js +4 -4
- package/es/defaultConfig.json +76 -76
- package/es/tools/UeditorResourceLoader.js +11 -16
- package/es/tools/filterHtmlNode.d.ts +5 -0
- package/es/tools/filterHtmlNode.js +41 -0
- package/es/tools/loadScript.js +5 -7
- package/es/type.d.ts +6 -0
- package/lib/LcdpUeditor.js +18 -8
- package/lib/defaultConfig.json +76 -76
- package/lib/tools/filterHtmlNode.d.ts +5 -0
- package/lib/tools/filterHtmlNode.js +61 -0
- package/lib/type.d.ts +6 -0
- package/package.json +35 -34
- package/ueditor-resource/dialogs/anchor/anchor.html +62 -62
- package/ueditor-resource/dialogs/attachment/attachment.css +716 -716
- package/ueditor-resource/dialogs/attachment/attachment.html +61 -61
- package/ueditor-resource/dialogs/attachment/attachment.js +803 -803
- package/ueditor-resource/dialogs/audio/audio.css +879 -879
- package/ueditor-resource/dialogs/audio/audio.html +93 -93
- package/ueditor-resource/dialogs/audio/audio.js +815 -815
- package/ueditor-resource/dialogs/background/background.css +193 -193
- package/ueditor-resource/dialogs/background/background.html +59 -59
- package/ueditor-resource/dialogs/background/background.js +370 -370
- package/ueditor-resource/dialogs/contentimport/contentimport.html +176 -176
- package/ueditor-resource/dialogs/contentimport/contentimport.js +91 -91
- package/ueditor-resource/dialogs/emotion/emotion.css +129 -129
- package/ueditor-resource/dialogs/emotion/emotion.html +70 -70
- package/ueditor-resource/dialogs/emotion/emotion.js +186 -186
- package/ueditor-resource/dialogs/formula/formula.html +98 -98
- package/ueditor-resource/dialogs/formula/formula.js +147 -147
- package/ueditor-resource/dialogs/help/help.css +37 -37
- package/ueditor-resource/dialogs/help/help.html +82 -82
- package/ueditor-resource/dialogs/help/help.js +57 -57
- package/ueditor-resource/dialogs/image/image.css +768 -768
- package/ueditor-resource/dialogs/image/image.html +144 -144
- package/ueditor-resource/dialogs/image/image.js +1060 -1060
- package/ueditor-resource/dialogs/insertframe/insertframe.html +135 -135
- package/ueditor-resource/dialogs/internal.js +81 -81
- package/ueditor-resource/dialogs/link/link.html +148 -148
- package/ueditor-resource/dialogs/preview/preview.html +45 -45
- package/ueditor-resource/dialogs/scrawl/scrawl.css +324 -324
- package/ueditor-resource/dialogs/scrawl/scrawl.html +95 -95
- package/ueditor-resource/dialogs/scrawl/scrawl.js +682 -682
- package/ueditor-resource/dialogs/searchreplace/searchreplace.html +144 -144
- package/ueditor-resource/dialogs/searchreplace/searchreplace.js +174 -174
- package/ueditor-resource/dialogs/spechars/spechars.html +42 -42
- package/ueditor-resource/dialogs/spechars/spechars.js +86 -86
- package/ueditor-resource/dialogs/table/edittable.css +85 -85
- package/ueditor-resource/dialogs/table/edittable.html +69 -69
- package/ueditor-resource/dialogs/table/edittable.js +241 -241
- package/ueditor-resource/dialogs/table/edittd.html +62 -62
- package/ueditor-resource/dialogs/table/edittip.html +33 -33
- package/ueditor-resource/dialogs/template/config.js +42 -42
- package/ueditor-resource/dialogs/template/template.css +99 -99
- package/ueditor-resource/dialogs/template/template.html +26 -26
- package/ueditor-resource/dialogs/template/template.js +53 -53
- package/ueditor-resource/dialogs/video/video.css +909 -909
- package/ueditor-resource/dialogs/video/video.html +114 -114
- package/ueditor-resource/dialogs/video/video.js +867 -867
- package/ueditor-resource/dialogs/wordimage/wordimage.html +221 -221
- package/ueditor-resource/dialogs/wordimage/wordimage.js +93 -93
- package/ueditor-resource/lang/en/en.js +686 -686
- package/ueditor-resource/lang/zh-cn/zh-cn.js +748 -748
- package/ueditor-resource/lang/zh-tw/zh-tw.js +748 -748
- package/ueditor-resource/plugins/demo/demo.js +3 -3
- package/ueditor-resource/themes/default/css/ueditor.css +2148 -2148
- package/ueditor-resource/themes/default/dialog.css +17 -17
- package/ueditor-resource/themes/default/dialogbase.css +132 -132
- package/ueditor-resource/themes/default/exts/ai.svg +12 -12
- package/ueditor-resource/themes/default/exts/apk.svg +12 -12
- package/ueditor-resource/themes/default/exts/chm.svg +12 -12
- package/ueditor-resource/themes/default/exts/css.svg +12 -12
- package/ueditor-resource/themes/default/exts/doc.svg +22 -22
- package/ueditor-resource/themes/default/exts/docx.svg +22 -22
- package/ueditor-resource/themes/default/exts/dwg.svg +16 -16
- package/ueditor-resource/themes/default/exts/folder.svg +3 -3
- package/ueditor-resource/themes/default/exts/gif.svg +14 -14
- package/ueditor-resource/themes/default/exts/html.svg +12 -12
- package/ueditor-resource/themes/default/exts/jpeg.svg +14 -14
- package/ueditor-resource/themes/default/exts/jpg.svg +14 -14
- package/ueditor-resource/themes/default/exts/log.svg +12 -12
- package/ueditor-resource/themes/default/exts/mp3.svg +14 -14
- package/ueditor-resource/themes/default/exts/mp4.svg +12 -12
- package/ueditor-resource/themes/default/exts/pdf.svg +14 -14
- package/ueditor-resource/themes/default/exts/png.svg +14 -14
- package/ueditor-resource/themes/default/exts/ppt.svg +24 -24
- package/ueditor-resource/themes/default/exts/pptx.svg +24 -24
- package/ueditor-resource/themes/default/exts/psd.svg +12 -12
- package/ueditor-resource/themes/default/exts/rar.svg +12 -12
- package/ueditor-resource/themes/default/exts/svg.svg +12 -12
- package/ueditor-resource/themes/default/exts/torrent.svg +14 -14
- package/ueditor-resource/themes/default/exts/txt.svg +14 -14
- package/ueditor-resource/themes/default/exts/unknown.svg +12 -12
- package/ueditor-resource/themes/default/exts/xls.svg +25 -25
- package/ueditor-resource/themes/default/exts/xlsx.svg +25 -25
- package/ueditor-resource/themes/default/exts/zip.svg +12 -12
- package/ueditor-resource/themes/iframe.css +63 -63
- package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +3655 -3655
- package/ueditor-resource/third-party/clipboard/clipboard.js +752 -752
- package/ueditor-resource/third-party/codemirror/codemirror.css +106 -106
- package/ueditor-resource/third-party/codemirror/codemirror.js +3581 -3581
- package/ueditor-resource/third-party/jquery-3.5.1.js +1 -1
- package/ueditor-resource/third-party/jquery-3.5.1_1.js +4314 -4314
- package/ueditor-resource/third-party/webuploader/webuploader.css +88 -88
- package/ueditor-resource/third-party/webuploader/webuploader.js +3 -3
- package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.js +1255 -1255
- package/ueditor-resource/ueditor.all.js +5271 -5270
- package/ueditor-resource/ueditor.config.js +655 -656
- package/ueditor-resource/ueditor.parse.js +13 -13
- package/es/LcdpUeditor.d.ts.map +0 -1
- package/es/const.d.ts.map +0 -1
- package/es/index.d.ts.map +0 -1
- package/es/tools/UeditorResourceLoader.d.ts.map +0 -1
- package/es/tools/loadScript.d.ts.map +0 -1
- package/es/type.d.ts.map +0 -1
- package/ueditor-resource/index.html +0 -146
| @@ -1,135 +1,135 @@ | |
| 1 | 
            -
            <!DOCTYPE html>
         | 
| 2 | 
            -
            <html>
         | 
| 3 | 
            -
            <head>
         | 
| 4 | 
            -
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
         | 
| 5 | 
            -
                <title></title>
         | 
| 6 | 
            -
                <script type="text/javascript" src="../internal.js? | 
| 7 | 
            -
                <link rel="stylesheet" href="../../themes/default/dialog.css? | 
| 8 | 
            -
                <style type="text/css">
         | 
| 9 | 
            -
                    .warp {
         | 
| 10 | 
            -
                        width: 320px;
         | 
| 11 | 
            -
                        height: 200px;
         | 
| 12 | 
            -
                        margin-left: 5px;
         | 
| 13 | 
            -
                        padding: 20px 0 0 15px;
         | 
| 14 | 
            -
                        position: relative;
         | 
| 15 | 
            -
                    }
         | 
| 16 | 
            -
             | 
| 17 | 
            -
                    #url {
         | 
| 18 | 
            -
                        width: 290px;
         | 
| 19 | 
            -
                        margin-bottom: 2px;
         | 
| 20 | 
            -
                        margin-left: -6px;
         | 
| 21 | 
            -
                        margin-left: -2px \9;
         | 
| 22 | 
            -
                        *margin-left: 0;
         | 
| 23 | 
            -
                        _margin-left: 0;
         | 
| 24 | 
            -
                    }
         | 
| 25 | 
            -
             | 
| 26 | 
            -
                    .format span {
         | 
| 27 | 
            -
                        display: inline-block;
         | 
| 28 | 
            -
                        width: 58px;
         | 
| 29 | 
            -
                        text-align: left;
         | 
| 30 | 
            -
                        zoom: 1;
         | 
| 31 | 
            -
                    }
         | 
| 32 | 
            -
             | 
| 33 | 
            -
                    table td {
         | 
| 34 | 
            -
                        padding: 5px 0;
         | 
| 35 | 
            -
                    }
         | 
| 36 | 
            -
             | 
| 37 | 
            -
                    #align {
         | 
| 38 | 
            -
                        width: 65px;
         | 
| 39 | 
            -
                        height: 23px;
         | 
| 40 | 
            -
                        line-height: 22px;
         | 
| 41 | 
            -
                    }
         | 
| 42 | 
            -
                </style>
         | 
| 43 | 
            -
            </head>
         | 
| 44 | 
            -
            <body>
         | 
| 45 | 
            -
            <div class="warp">
         | 
| 46 | 
            -
                <table width="300" cellpadding="0" cellspacing="0">
         | 
| 47 | 
            -
                    <tr>
         | 
| 48 | 
            -
                        <td colspan="2" class="format">
         | 
| 49 | 
            -
                            <span><var id="lang_input_address"></var></span>
         | 
| 50 | 
            -
                            <input style="width:200px" id="url" type="text" value=""/>
         | 
| 51 | 
            -
                        </td>
         | 
| 52 | 
            -
                    </tr>
         | 
| 53 | 
            -
                    <tr>
         | 
| 54 | 
            -
                        <td colspan="2" class="format"><span><var id="lang_input_width"></var></span><input style="width:200px"
         | 
| 55 | 
            -
                                                                                                            type="text" id="width"/>
         | 
| 56 | 
            -
                            px
         | 
| 57 | 
            -
                        </td>
         | 
| 58 | 
            -
             | 
| 59 | 
            -
                    </tr>
         | 
| 60 | 
            -
                    <tr>
         | 
| 61 | 
            -
                        <td colspan="2" class="format"><span><var id="lang_input_height"></var></span><input style="width:200px"
         | 
| 62 | 
            -
                                                                                                             type="text"
         | 
| 63 | 
            -
                                                                                                             id="height"/> px
         | 
| 64 | 
            -
                        </td>
         | 
| 65 | 
            -
                    </tr>
         | 
| 66 | 
            -
                    <tr>
         | 
| 67 | 
            -
                        <td><span><var id="lang_input_isScroll"></var></span><input type="checkbox" id="scroll"/></td>
         | 
| 68 | 
            -
                        <td><span><var id="lang_input_frameborder"></var></span><input type="checkbox" id="frameborder"/></td>
         | 
| 69 | 
            -
                    </tr>
         | 
| 70 | 
            -
             | 
| 71 | 
            -
                    <tr>
         | 
| 72 | 
            -
                        <td colspan="2"><span><var id="lang_input_alignMode"></var></span>
         | 
| 73 | 
            -
                            <select id="align">
         | 
| 74 | 
            -
                                <option value=""></option>
         | 
| 75 | 
            -
                                <option value="left"></option>
         | 
| 76 | 
            -
                                <option value="right"></option>
         | 
| 77 | 
            -
                            </select>
         | 
| 78 | 
            -
                        </td>
         | 
| 79 | 
            -
                    </tr>
         | 
| 80 | 
            -
                </table>
         | 
| 81 | 
            -
            </div>
         | 
| 82 | 
            -
            <script type="text/javascript">
         | 
| 83 | 
            -
                var iframe = editor._iframe;
         | 
| 84 | 
            -
                if (iframe) {
         | 
| 85 | 
            -
                    $G("url").value = iframe.getAttribute("src") || "";
         | 
| 86 | 
            -
                    $G("width").value = iframe.getAttribute("width") || iframe.style.width.replace("px", "") || "";
         | 
| 87 | 
            -
                    $G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px", "") || "";
         | 
| 88 | 
            -
                    $G("scroll").checked = (iframe.getAttribute("scrolling") == "yes") ? true : false;
         | 
| 89 | 
            -
                    $G("frameborder").checked = (iframe.getAttribute("frameborder") == "1") ? true : false;
         | 
| 90 | 
            -
                    $G("align").value = iframe.align ? iframe.align : "";
         | 
| 91 | 
            -
                }
         | 
| 92 | 
            -
             | 
| 93 | 
            -
                function queding() {
         | 
| 94 | 
            -
                    var url = $G("url").value.replace(/^\s*|\s*$/ig, ""),
         | 
| 95 | 
            -
                        width = $G("width").value,
         | 
| 96 | 
            -
                        height = $G("height").value,
         | 
| 97 | 
            -
                        scroll = $G("scroll"),
         | 
| 98 | 
            -
                        frameborder = $G("frameborder"),
         | 
| 99 | 
            -
                        float = $G("align").value,
         | 
| 100 | 
            -
                        newIframe = editor.document.createElement("iframe"),
         | 
| 101 | 
            -
                        div;
         | 
| 102 | 
            -
                    if (!url) {
         | 
| 103 | 
            -
                        alert(lang.enterAddress);
         | 
| 104 | 
            -
                        return false;
         | 
| 105 | 
            -
                    }
         | 
| 106 | 
            -
                    newIframe.setAttribute("src", /http:\/\/|https:\/\//ig.test(url) ? url : "http://" + url);
         | 
| 107 | 
            -
                    /^[1-9]+[.]?\d*$/g.test(width) ? newIframe.setAttribute("width", width) : "";
         | 
| 108 | 
            -
                    /^[1-9]+[.]?\d*$/g.test(height) ? newIframe.setAttribute("height", height) : "";
         | 
| 109 | 
            -
                    scroll.checked ? newIframe.setAttribute("scrolling", "yes") : newIframe.setAttribute("scrolling", "no");
         | 
| 110 | 
            -
                    frameborder.checked ? newIframe.setAttribute("frameborder", "1", 0) : newIframe.setAttribute("frameborder", "0", 0);
         | 
| 111 | 
            -
                    float ? newIframe.setAttribute("align", float) : newIframe.setAttribute("align", "");
         | 
| 112 | 
            -
                    if (iframe) {
         | 
| 113 | 
            -
                        iframe.parentNode.insertBefore(newIframe, iframe);
         | 
| 114 | 
            -
                        domUtils.remove(iframe);
         | 
| 115 | 
            -
                    } else {
         | 
| 116 | 
            -
                        div = editor.document.createElement("div");
         | 
| 117 | 
            -
                        div.appendChild(newIframe);
         | 
| 118 | 
            -
                        editor.execCommand("inserthtml", div.innerHTML);
         | 
| 119 | 
            -
                    }
         | 
| 120 | 
            -
                    editor._iframe = null;
         | 
| 121 | 
            -
                    dialog.close();
         | 
| 122 | 
            -
                }
         | 
| 123 | 
            -
             | 
| 124 | 
            -
                dialog.onok = queding;
         | 
| 125 | 
            -
                $G("url").onkeydown = function (evt) {
         | 
| 126 | 
            -
                    evt = evt || event;
         | 
| 127 | 
            -
                    if (evt.keyCode == 13) {
         | 
| 128 | 
            -
                        queding();
         | 
| 129 | 
            -
                    }
         | 
| 130 | 
            -
                };
         | 
| 131 | 
            -
                $focus($G("url"));
         | 
| 132 | 
            -
             | 
| 133 | 
            -
            </script>
         | 
| 134 | 
            -
            </body>
         | 
| 135 | 
            -
            </html>
         | 
| 1 | 
            +
            <!DOCTYPE html>
         | 
| 2 | 
            +
            <html>
         | 
| 3 | 
            +
            <head>
         | 
| 4 | 
            +
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
         | 
| 5 | 
            +
                <title></title>
         | 
| 6 | 
            +
                <script type="text/javascript" src="../internal.js?aea0c61c"></script>
         | 
| 7 | 
            +
                <link rel="stylesheet" href="../../themes/default/dialog.css?963f161c">
         | 
| 8 | 
            +
                <style type="text/css">
         | 
| 9 | 
            +
                    .warp {
         | 
| 10 | 
            +
                        width: 320px;
         | 
| 11 | 
            +
                        height: 200px;
         | 
| 12 | 
            +
                        margin-left: 5px;
         | 
| 13 | 
            +
                        padding: 20px 0 0 15px;
         | 
| 14 | 
            +
                        position: relative;
         | 
| 15 | 
            +
                    }
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                    #url {
         | 
| 18 | 
            +
                        width: 290px;
         | 
| 19 | 
            +
                        margin-bottom: 2px;
         | 
| 20 | 
            +
                        margin-left: -6px;
         | 
| 21 | 
            +
                        margin-left: -2px \9;
         | 
| 22 | 
            +
                        *margin-left: 0;
         | 
| 23 | 
            +
                        _margin-left: 0;
         | 
| 24 | 
            +
                    }
         | 
| 25 | 
            +
             | 
| 26 | 
            +
                    .format span {
         | 
| 27 | 
            +
                        display: inline-block;
         | 
| 28 | 
            +
                        width: 58px;
         | 
| 29 | 
            +
                        text-align: left;
         | 
| 30 | 
            +
                        zoom: 1;
         | 
| 31 | 
            +
                    }
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                    table td {
         | 
| 34 | 
            +
                        padding: 5px 0;
         | 
| 35 | 
            +
                    }
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                    #align {
         | 
| 38 | 
            +
                        width: 65px;
         | 
| 39 | 
            +
                        height: 23px;
         | 
| 40 | 
            +
                        line-height: 22px;
         | 
| 41 | 
            +
                    }
         | 
| 42 | 
            +
                </style>
         | 
| 43 | 
            +
            </head>
         | 
| 44 | 
            +
            <body>
         | 
| 45 | 
            +
            <div class="warp">
         | 
| 46 | 
            +
                <table width="300" cellpadding="0" cellspacing="0">
         | 
| 47 | 
            +
                    <tr>
         | 
| 48 | 
            +
                        <td colspan="2" class="format">
         | 
| 49 | 
            +
                            <span><var id="lang_input_address"></var></span>
         | 
| 50 | 
            +
                            <input style="width:200px" id="url" type="text" value=""/>
         | 
| 51 | 
            +
                        </td>
         | 
| 52 | 
            +
                    </tr>
         | 
| 53 | 
            +
                    <tr>
         | 
| 54 | 
            +
                        <td colspan="2" class="format"><span><var id="lang_input_width"></var></span><input style="width:200px"
         | 
| 55 | 
            +
                                                                                                            type="text" id="width"/>
         | 
| 56 | 
            +
                            px
         | 
| 57 | 
            +
                        </td>
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                    </tr>
         | 
| 60 | 
            +
                    <tr>
         | 
| 61 | 
            +
                        <td colspan="2" class="format"><span><var id="lang_input_height"></var></span><input style="width:200px"
         | 
| 62 | 
            +
                                                                                                             type="text"
         | 
| 63 | 
            +
                                                                                                             id="height"/> px
         | 
| 64 | 
            +
                        </td>
         | 
| 65 | 
            +
                    </tr>
         | 
| 66 | 
            +
                    <tr>
         | 
| 67 | 
            +
                        <td><span><var id="lang_input_isScroll"></var></span><input type="checkbox" id="scroll"/></td>
         | 
| 68 | 
            +
                        <td><span><var id="lang_input_frameborder"></var></span><input type="checkbox" id="frameborder"/></td>
         | 
| 69 | 
            +
                    </tr>
         | 
| 70 | 
            +
             | 
| 71 | 
            +
                    <tr>
         | 
| 72 | 
            +
                        <td colspan="2"><span><var id="lang_input_alignMode"></var></span>
         | 
| 73 | 
            +
                            <select id="align">
         | 
| 74 | 
            +
                                <option value=""></option>
         | 
| 75 | 
            +
                                <option value="left"></option>
         | 
| 76 | 
            +
                                <option value="right"></option>
         | 
| 77 | 
            +
                            </select>
         | 
| 78 | 
            +
                        </td>
         | 
| 79 | 
            +
                    </tr>
         | 
| 80 | 
            +
                </table>
         | 
| 81 | 
            +
            </div>
         | 
| 82 | 
            +
            <script type="text/javascript">
         | 
| 83 | 
            +
                var iframe = editor._iframe;
         | 
| 84 | 
            +
                if (iframe) {
         | 
| 85 | 
            +
                    $G("url").value = iframe.getAttribute("src") || "";
         | 
| 86 | 
            +
                    $G("width").value = iframe.getAttribute("width") || iframe.style.width.replace("px", "") || "";
         | 
| 87 | 
            +
                    $G("height").value = iframe.getAttribute("height") || iframe.style.height.replace("px", "") || "";
         | 
| 88 | 
            +
                    $G("scroll").checked = (iframe.getAttribute("scrolling") == "yes") ? true : false;
         | 
| 89 | 
            +
                    $G("frameborder").checked = (iframe.getAttribute("frameborder") == "1") ? true : false;
         | 
| 90 | 
            +
                    $G("align").value = iframe.align ? iframe.align : "";
         | 
| 91 | 
            +
                }
         | 
| 92 | 
            +
             | 
| 93 | 
            +
                function queding() {
         | 
| 94 | 
            +
                    var url = $G("url").value.replace(/^\s*|\s*$/ig, ""),
         | 
| 95 | 
            +
                        width = $G("width").value,
         | 
| 96 | 
            +
                        height = $G("height").value,
         | 
| 97 | 
            +
                        scroll = $G("scroll"),
         | 
| 98 | 
            +
                        frameborder = $G("frameborder"),
         | 
| 99 | 
            +
                        float = $G("align").value,
         | 
| 100 | 
            +
                        newIframe = editor.document.createElement("iframe"),
         | 
| 101 | 
            +
                        div;
         | 
| 102 | 
            +
                    if (!url) {
         | 
| 103 | 
            +
                        alert(lang.enterAddress);
         | 
| 104 | 
            +
                        return false;
         | 
| 105 | 
            +
                    }
         | 
| 106 | 
            +
                    newIframe.setAttribute("src", /http:\/\/|https:\/\//ig.test(url) ? url : "http://" + url);
         | 
| 107 | 
            +
                    /^[1-9]+[.]?\d*$/g.test(width) ? newIframe.setAttribute("width", width) : "";
         | 
| 108 | 
            +
                    /^[1-9]+[.]?\d*$/g.test(height) ? newIframe.setAttribute("height", height) : "";
         | 
| 109 | 
            +
                    scroll.checked ? newIframe.setAttribute("scrolling", "yes") : newIframe.setAttribute("scrolling", "no");
         | 
| 110 | 
            +
                    frameborder.checked ? newIframe.setAttribute("frameborder", "1", 0) : newIframe.setAttribute("frameborder", "0", 0);
         | 
| 111 | 
            +
                    float ? newIframe.setAttribute("align", float) : newIframe.setAttribute("align", "");
         | 
| 112 | 
            +
                    if (iframe) {
         | 
| 113 | 
            +
                        iframe.parentNode.insertBefore(newIframe, iframe);
         | 
| 114 | 
            +
                        domUtils.remove(iframe);
         | 
| 115 | 
            +
                    } else {
         | 
| 116 | 
            +
                        div = editor.document.createElement("div");
         | 
| 117 | 
            +
                        div.appendChild(newIframe);
         | 
| 118 | 
            +
                        editor.execCommand("inserthtml", div.innerHTML);
         | 
| 119 | 
            +
                    }
         | 
| 120 | 
            +
                    editor._iframe = null;
         | 
| 121 | 
            +
                    dialog.close();
         | 
| 122 | 
            +
                }
         | 
| 123 | 
            +
             | 
| 124 | 
            +
                dialog.onok = queding;
         | 
| 125 | 
            +
                $G("url").onkeydown = function (evt) {
         | 
| 126 | 
            +
                    evt = evt || event;
         | 
| 127 | 
            +
                    if (evt.keyCode == 13) {
         | 
| 128 | 
            +
                        queding();
         | 
| 129 | 
            +
                    }
         | 
| 130 | 
            +
                };
         | 
| 131 | 
            +
                $focus($G("url"));
         | 
| 132 | 
            +
             | 
| 133 | 
            +
            </script>
         | 
| 134 | 
            +
            </body>
         | 
| 135 | 
            +
            </html>
         | 
| @@ -1,81 +1,81 @@ | |
| 1 | 
            -
            (function () {
         | 
| 2 | 
            -
                var parent = window.parent;
         | 
| 3 | 
            -
                //dialog对象
         | 
| 4 | 
            -
                dialog = parent.$EDITORUI[window.frameElement.id.replace(/_iframe$/, '')];
         | 
| 5 | 
            -
                //当前打开dialog的编辑器实例
         | 
| 6 | 
            -
                editor = dialog.editor;
         | 
| 7 | 
            -
             | 
| 8 | 
            -
                UE = parent.UE;
         | 
| 9 | 
            -
             | 
| 10 | 
            -
                domUtils = UE.dom.domUtils;
         | 
| 11 | 
            -
             | 
| 12 | 
            -
                utils = UE.utils;
         | 
| 13 | 
            -
             | 
| 14 | 
            -
                browser = UE.browser;
         | 
| 15 | 
            -
             | 
| 16 | 
            -
                ajax = UE.ajax;
         | 
| 17 | 
            -
             | 
| 18 | 
            -
                $G = function (id) {
         | 
| 19 | 
            -
                    return document.getElementById(id)
         | 
| 20 | 
            -
                };
         | 
| 21 | 
            -
                //focus元素
         | 
| 22 | 
            -
                $focus = function (node) {
         | 
| 23 | 
            -
                    setTimeout(function () {
         | 
| 24 | 
            -
                        if (browser.ie) {
         | 
| 25 | 
            -
                            var r = node.createTextRange();
         | 
| 26 | 
            -
                            r.collapse(false);
         | 
| 27 | 
            -
                            r.select();
         | 
| 28 | 
            -
                        } else {
         | 
| 29 | 
            -
                            node.focus()
         | 
| 30 | 
            -
                        }
         | 
| 31 | 
            -
                    }, 0)
         | 
| 32 | 
            -
                };
         | 
| 33 | 
            -
                utils.loadFile(document, {
         | 
| 34 | 
            -
                    href: editor.options.themePath + editor.options.theme + "/dialogbase.css?cache=" + Math.random(),
         | 
| 35 | 
            -
                    tag: "link",
         | 
| 36 | 
            -
                    type: "text/css",
         | 
| 37 | 
            -
                    rel: "stylesheet"
         | 
| 38 | 
            -
                });
         | 
| 39 | 
            -
                lang = editor.getLang(dialog.className.split("-")[2]);
         | 
| 40 | 
            -
                if (lang) {
         | 
| 41 | 
            -
                    domUtils.on(window, 'load', function () {
         | 
| 42 | 
            -
             | 
| 43 | 
            -
                        var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
         | 
| 44 | 
            -
                        //针对静态资源
         | 
| 45 | 
            -
                        for (var i in lang["static"]) {
         | 
| 46 | 
            -
                            var dom = $G(i);
         | 
| 47 | 
            -
                            if (!dom) continue;
         | 
| 48 | 
            -
                            var tagName = dom.tagName,
         | 
| 49 | 
            -
                                content = lang["static"][i];
         | 
| 50 | 
            -
                            if (content.src) {
         | 
| 51 | 
            -
                                //clone
         | 
| 52 | 
            -
                                content = utils.extend({}, content, false);
         | 
| 53 | 
            -
                                content.src = langImgPath + content.src;
         | 
| 54 | 
            -
                            }
         | 
| 55 | 
            -
                            if (content.style) {
         | 
| 56 | 
            -
                                content = utils.extend({}, content, false);
         | 
| 57 | 
            -
                                content.style = content.style.replace(/url\s*\(/g, "url(" + langImgPath)
         | 
| 58 | 
            -
                            }
         | 
| 59 | 
            -
                            switch (tagName.toLowerCase()) {
         | 
| 60 | 
            -
                                case "var":
         | 
| 61 | 
            -
                                    dom.parentNode.replaceChild(document.createTextNode(content), dom);
         | 
| 62 | 
            -
                                    break;
         | 
| 63 | 
            -
                                case "select":
         | 
| 64 | 
            -
                                    var ops = dom.options;
         | 
| 65 | 
            -
                                    for (var j = 0, oj; oj = ops[j];) {
         | 
| 66 | 
            -
                                        oj.innerHTML = content.options[j++];
         | 
| 67 | 
            -
                                    }
         | 
| 68 | 
            -
                                    for (var p in content) {
         | 
| 69 | 
            -
                                        p != "options" && dom.setAttribute(p, content[p]);
         | 
| 70 | 
            -
                                    }
         | 
| 71 | 
            -
                                    break;
         | 
| 72 | 
            -
                                default :
         | 
| 73 | 
            -
                                    domUtils.setAttributes(dom, content);
         | 
| 74 | 
            -
                            }
         | 
| 75 | 
            -
                        }
         | 
| 76 | 
            -
                    });
         | 
| 77 | 
            -
                }
         | 
| 78 | 
            -
             | 
| 79 | 
            -
             | 
| 80 | 
            -
            })();
         | 
| 81 | 
            -
             | 
| 1 | 
            +
            (function () {
         | 
| 2 | 
            +
                var parent = window.parent;
         | 
| 3 | 
            +
                //dialog对象
         | 
| 4 | 
            +
                dialog = parent.$EDITORUI[window.frameElement.id.replace(/_iframe$/, '')];
         | 
| 5 | 
            +
                //当前打开dialog的编辑器实例
         | 
| 6 | 
            +
                editor = dialog.editor;
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                UE = parent.UE;
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                domUtils = UE.dom.domUtils;
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                utils = UE.utils;
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                browser = UE.browser;
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                ajax = UE.ajax;
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                $G = function (id) {
         | 
| 19 | 
            +
                    return document.getElementById(id)
         | 
| 20 | 
            +
                };
         | 
| 21 | 
            +
                //focus元素
         | 
| 22 | 
            +
                $focus = function (node) {
         | 
| 23 | 
            +
                    setTimeout(function () {
         | 
| 24 | 
            +
                        if (browser.ie) {
         | 
| 25 | 
            +
                            var r = node.createTextRange();
         | 
| 26 | 
            +
                            r.collapse(false);
         | 
| 27 | 
            +
                            r.select();
         | 
| 28 | 
            +
                        } else {
         | 
| 29 | 
            +
                            node.focus()
         | 
| 30 | 
            +
                        }
         | 
| 31 | 
            +
                    }, 0)
         | 
| 32 | 
            +
                };
         | 
| 33 | 
            +
                utils.loadFile(document, {
         | 
| 34 | 
            +
                    href: editor.options.themePath + editor.options.theme + "/dialogbase.css?cache=" + Math.random(),
         | 
| 35 | 
            +
                    tag: "link",
         | 
| 36 | 
            +
                    type: "text/css",
         | 
| 37 | 
            +
                    rel: "stylesheet"
         | 
| 38 | 
            +
                });
         | 
| 39 | 
            +
                lang = editor.getLang(dialog.className.split("-")[2]);
         | 
| 40 | 
            +
                if (lang) {
         | 
| 41 | 
            +
                    domUtils.on(window, 'load', function () {
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                        var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
         | 
| 44 | 
            +
                        //针对静态资源
         | 
| 45 | 
            +
                        for (var i in lang["static"]) {
         | 
| 46 | 
            +
                            var dom = $G(i);
         | 
| 47 | 
            +
                            if (!dom) continue;
         | 
| 48 | 
            +
                            var tagName = dom.tagName,
         | 
| 49 | 
            +
                                content = lang["static"][i];
         | 
| 50 | 
            +
                            if (content.src) {
         | 
| 51 | 
            +
                                //clone
         | 
| 52 | 
            +
                                content = utils.extend({}, content, false);
         | 
| 53 | 
            +
                                content.src = langImgPath + content.src;
         | 
| 54 | 
            +
                            }
         | 
| 55 | 
            +
                            if (content.style) {
         | 
| 56 | 
            +
                                content = utils.extend({}, content, false);
         | 
| 57 | 
            +
                                content.style = content.style.replace(/url\s*\(/g, "url(" + langImgPath)
         | 
| 58 | 
            +
                            }
         | 
| 59 | 
            +
                            switch (tagName.toLowerCase()) {
         | 
| 60 | 
            +
                                case "var":
         | 
| 61 | 
            +
                                    dom.parentNode.replaceChild(document.createTextNode(content), dom);
         | 
| 62 | 
            +
                                    break;
         | 
| 63 | 
            +
                                case "select":
         | 
| 64 | 
            +
                                    var ops = dom.options;
         | 
| 65 | 
            +
                                    for (var j = 0, oj; oj = ops[j];) {
         | 
| 66 | 
            +
                                        oj.innerHTML = content.options[j++];
         | 
| 67 | 
            +
                                    }
         | 
| 68 | 
            +
                                    for (var p in content) {
         | 
| 69 | 
            +
                                        p != "options" && dom.setAttribute(p, content[p]);
         | 
| 70 | 
            +
                                    }
         | 
| 71 | 
            +
                                    break;
         | 
| 72 | 
            +
                                default :
         | 
| 73 | 
            +
                                    domUtils.setAttributes(dom, content);
         | 
| 74 | 
            +
                            }
         | 
| 75 | 
            +
                        }
         | 
| 76 | 
            +
                    });
         | 
| 77 | 
            +
                }
         | 
| 78 | 
            +
             | 
| 79 | 
            +
             | 
| 80 | 
            +
            })();
         | 
| 81 | 
            +
             |