@lingxiteam/lcdp-ueditor-react 1.0.2 → 1.0.3-alpha.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 +3 -1
- package/es/tools/UeditorResourceLoader.d.ts +1 -1
- package/es/tools/UeditorResourceLoader.js +18 -7
- package/lib/LcdpUeditor.js +1 -3
- package/lib/tools/UeditorResourceLoader.d.ts +1 -1
- package/lib/tools/UeditorResourceLoader.js +15 -7
- package/package.json +1 -1
- package/ueditor-resource/dialogs/anchor/anchor.html +1 -1
- package/ueditor-resource/dialogs/attachment/attachment.css +2 -715
- package/ueditor-resource/dialogs/attachment/attachment.html +6 -6
- package/ueditor-resource/dialogs/attachment/attachment.js +2 -803
- package/ueditor-resource/dialogs/audio/audio.css +2 -878
- package/ueditor-resource/dialogs/audio/audio.js +2 -815
- package/ueditor-resource/dialogs/background/background.css +2 -192
- package/ueditor-resource/dialogs/background/background.html +3 -3
- package/ueditor-resource/dialogs/background/background.js +2 -370
- package/ueditor-resource/dialogs/contentimport/contentimport.html +3 -3
- package/ueditor-resource/dialogs/contentimport/contentimport.js +2 -91
- package/ueditor-resource/dialogs/emotion/emotion.css +2 -128
- package/ueditor-resource/dialogs/emotion/emotion.html +3 -3
- package/ueditor-resource/dialogs/emotion/emotion.js +2 -186
- package/ueditor-resource/dialogs/formula/formula.html +4 -4
- package/ueditor-resource/dialogs/formula/formula.js +2 -147
- package/ueditor-resource/dialogs/help/help.css +2 -36
- package/ueditor-resource/dialogs/help/help.html +3 -3
- package/ueditor-resource/dialogs/help/help.js +2 -57
- package/ueditor-resource/dialogs/image/image.css +2 -767
- package/ueditor-resource/dialogs/image/image.js +2 -1060
- package/ueditor-resource/dialogs/insertframe/insertframe.html +2 -2
- package/ueditor-resource/dialogs/internal.js +2 -81
- package/ueditor-resource/dialogs/preview/preview.html +2 -2
- package/ueditor-resource/dialogs/scrawl/scrawl.css +2 -323
- package/ueditor-resource/dialogs/scrawl/scrawl.html +3 -3
- package/ueditor-resource/dialogs/scrawl/scrawl.js +2 -682
- package/ueditor-resource/dialogs/searchreplace/searchreplace.html +2 -2
- package/ueditor-resource/dialogs/searchreplace/searchreplace.js +2 -174
- package/ueditor-resource/dialogs/spechars/spechars.html +2 -2
- package/ueditor-resource/dialogs/spechars/spechars.js +2 -86
- package/ueditor-resource/dialogs/table/edittable.css +2 -84
- package/ueditor-resource/dialogs/table/edittable.html +3 -3
- package/ueditor-resource/dialogs/table/edittable.js +2 -241
- package/ueditor-resource/dialogs/table/edittd.html +1 -1
- package/ueditor-resource/dialogs/table/edittip.html +1 -1
- package/ueditor-resource/dialogs/template/config.js +2 -42
- package/ueditor-resource/dialogs/template/template.css +2 -98
- package/ueditor-resource/dialogs/template/template.html +4 -4
- package/ueditor-resource/dialogs/template/template.js +2 -53
- package/ueditor-resource/dialogs/video/video.css +2 -908
- package/ueditor-resource/dialogs/video/video.js +2 -867
- package/ueditor-resource/dialogs/wordimage/wordimage.html +5 -5
- package/ueditor-resource/dialogs/wordimage/wordimage.js +2 -93
- package/ueditor-resource/lang/en/en.js +2 -686
- package/ueditor-resource/lang/zh-cn/zh-cn.js +2 -748
- package/ueditor-resource/lang/zh-tw/zh-tw.js +2 -748
- package/ueditor-resource/plugins/demo/demo.js +1 -3
- package/ueditor-resource/themes/default/css/ueditor.css +2 -2148
- package/ueditor-resource/themes/default/dialog.css +2 -16
- package/ueditor-resource/themes/default/dialogbase.css +2 -131
- package/ueditor-resource/themes/iframe.css +2 -62
- package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +4 -3655
- package/ueditor-resource/third-party/SyntaxHighlighter/shCoreDefault.css +3 -1
- package/ueditor-resource/third-party/clipboard/clipboard.js +2 -753
- package/ueditor-resource/third-party/codemirror/codemirror.css +2 -105
- package/ueditor-resource/third-party/codemirror/codemirror.js +3 -3581
- package/ueditor-resource/third-party/jquery-3.5.1.js +4 -2
- package/ueditor-resource/third-party/jquery-3.5.1_1.js +4 -4314
- package/ueditor-resource/third-party/webuploader/webuploader.css +2 -87
- package/ueditor-resource/third-party/webuploader/webuploader.js +5 -4
- package/ueditor-resource/ueditor.all.js +20 -32644
- package/ueditor-resource/ueditor.config.js +2 -655
- package/ueditor-resource/ueditor.parse.js +2 -639
- 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/filterHtmlNode.d.ts.map +0 -1
- package/es/tools/loadScript.d.ts.map +0 -1
- package/es/type.d.ts.map +0 -1
| @@ -4,7 +4,7 @@ | |
| 4 4 | 
             
            <head>
         | 
| 5 5 | 
             
                <title></title>
         | 
| 6 6 | 
             
                <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
         | 
| 7 | 
            -
                <script type="text/javascript" src="../internal.js? | 
| 7 | 
            +
                <script type="text/javascript" src="../internal.js?04dbe7f0"></script>
         | 
| 8 8 | 
             
                <style type="text/css">
         | 
| 9 9 | 
             
                    .wrapper {
         | 
| 10 10 | 
             
                        width: 600px;
         | 
| @@ -129,10 +129,10 @@ | |
| 129 129 | 
             
                    </div>
         | 
| 130 130 | 
             
                </div>
         | 
| 131 131 | 
             
            </div>
         | 
| 132 | 
            -
            <script src="../../third-party/jquery-3.5.1.js? | 
| 133 | 
            -
            <script src="../../third-party/webuploader/webuploader.js? | 
| 134 | 
            -
            <script type="text/javascript" src="../../third-party/clipboard/clipboard.js? | 
| 135 | 
            -
            <script type="text/javascript" src="wordimage.js? | 
| 132 | 
            +
            <script src="../../third-party/jquery-3.5.1.js?9a0f9431"></script>
         | 
| 133 | 
            +
            <script src="../../third-party/webuploader/webuploader.js?5e398948"></script>
         | 
| 134 | 
            +
            <script type="text/javascript" src="../../third-party/clipboard/clipboard.js?bae63983"></script>
         | 
| 135 | 
            +
            <script type="text/javascript" src="wordimage.js?94055851"></script>
         | 
| 136 136 | 
             
            <script type="text/javascript">
         | 
| 137 137 | 
             
                editor.setOpt({
         | 
| 138 138 | 
             
                    wordImageFieldName: "upfile",
         | 
| @@ -1,93 +1,2 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
              | 
| 3 | 
            -
             * User: taoqili
         | 
| 4 | 
            -
             * Date: 12-1-30
         | 
| 5 | 
            -
             * Time: 下午12:50
         | 
| 6 | 
            -
             * To change this template use File | Settings | File Templates.
         | 
| 7 | 
            -
             */
         | 
| 8 | 
            -
            var wordImage = {};
         | 
| 9 | 
            -
            var g = $G, flashObj, flashContainer;
         | 
| 10 | 
            -
             | 
| 11 | 
            -
            wordImage.init = function (opt, callbacks) {
         | 
| 12 | 
            -
                showLocalPath("fileUrl");
         | 
| 13 | 
            -
                createCopyButton("copyButton", "fileUrl");
         | 
| 14 | 
            -
                addUploadButtonListener();
         | 
| 15 | 
            -
                addOkListener();
         | 
| 16 | 
            -
            };
         | 
| 17 | 
            -
             | 
| 18 | 
            -
            function addUploadButtonListener() {
         | 
| 19 | 
            -
                g('saveFile').addEventListener('change', function () {
         | 
| 20 | 
            -
                    $('.image-tip').html('正在转存,请稍后...');
         | 
| 21 | 
            -
                    uploader.addFile(this.files);
         | 
| 22 | 
            -
                    uploader.upload();
         | 
| 23 | 
            -
                });
         | 
| 24 | 
            -
            }
         | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
            function addOkListener() {
         | 
| 28 | 
            -
                dialog.onok = function () {
         | 
| 29 | 
            -
                    //console.log('imageUrls',imageUrls);
         | 
| 30 | 
            -
                    if (!imageUrls.length) return;
         | 
| 31 | 
            -
                    var urlPrefix = editor.getOpt('imageUrlPrefix'),
         | 
| 32 | 
            -
                        images = domUtils.getElementsByTagName(editor.document, "img");
         | 
| 33 | 
            -
                    editor.fireEvent('saveScene');
         | 
| 34 | 
            -
                    // console.log('images',images,imageUrls);
         | 
| 35 | 
            -
                    for (var i = 0, img; img = images[i++];) {
         | 
| 36 | 
            -
                        var src = img.getAttribute("data-word-image");
         | 
| 37 | 
            -
                        if (!src) continue;
         | 
| 38 | 
            -
                        for (var j = 0, url; url = imageUrls[j++];) {
         | 
| 39 | 
            -
                            // console.log('url',src, url);
         | 
| 40 | 
            -
                            if (src.indexOf(url.name.replace(" ", "")) != -1) {
         | 
| 41 | 
            -
                                img.src = urlPrefix + url.url;
         | 
| 42 | 
            -
                                img.setAttribute("_src", urlPrefix + url.url);  //同时修改"_src"属性
         | 
| 43 | 
            -
                                img.setAttribute("title", url.title);
         | 
| 44 | 
            -
                                domUtils.removeAttributes(img, ["data-word-image", "style", "width", "height"]);
         | 
| 45 | 
            -
                                editor.fireEvent("selectionchange");
         | 
| 46 | 
            -
                                break;
         | 
| 47 | 
            -
                            }
         | 
| 48 | 
            -
                        }
         | 
| 49 | 
            -
                    }
         | 
| 50 | 
            -
                    editor.fireEvent('saveScene');
         | 
| 51 | 
            -
                    // hideFlash();
         | 
| 52 | 
            -
                };
         | 
| 53 | 
            -
                dialog.oncancel = function () {
         | 
| 54 | 
            -
                    //hideFlash();
         | 
| 55 | 
            -
                };
         | 
| 56 | 
            -
            }
         | 
| 57 | 
            -
             | 
| 58 | 
            -
            function showLocalPath(id) {
         | 
| 59 | 
            -
                //单张编辑
         | 
| 60 | 
            -
                var img = editor.selection.getRange().getClosedNode();
         | 
| 61 | 
            -
                var images = editor.execCommand('wordimage');
         | 
| 62 | 
            -
                if (images.length == 1 || img && img.tagName == 'IMG') {
         | 
| 63 | 
            -
                    g(id).value = images[0];
         | 
| 64 | 
            -
                    return;
         | 
| 65 | 
            -
                }
         | 
| 66 | 
            -
                var path = images[0];
         | 
| 67 | 
            -
                var leftSlashIndex = path.lastIndexOf("/") || 0,  //不同版本的doc和浏览器都可能影响到这个符号,故直接判断两种
         | 
| 68 | 
            -
                    rightSlashIndex = path.lastIndexOf("\\") || 0,
         | 
| 69 | 
            -
                    separater = leftSlashIndex > rightSlashIndex ? "/" : "\\";
         | 
| 70 | 
            -
             | 
| 71 | 
            -
                path = path.substring(0, path.lastIndexOf(separater) + 1);
         | 
| 72 | 
            -
                g(id).value = path;
         | 
| 73 | 
            -
                //增提醒用户选择哪些文件
         | 
| 74 | 
            -
                var names = [];
         | 
| 75 | 
            -
                for (var i = 0, len = images.length; i < len; i++) {
         | 
| 76 | 
            -
                    var img = images[i];
         | 
| 77 | 
            -
                    names.push(img.substring(img.lastIndexOf(separater) + 1, img.length));
         | 
| 78 | 
            -
                }
         | 
| 79 | 
            -
                $('.image-tip').html('<span style="color:#ff0000;">请选择:' + names.join("、") + "共" + images.length + '个文件</span>');
         | 
| 80 | 
            -
            }
         | 
| 81 | 
            -
             | 
| 82 | 
            -
            function createCopyButton(id, dataFrom) {
         | 
| 83 | 
            -
                var url = g(dataFrom).value;
         | 
| 84 | 
            -
                if (url.startsWith("file:////")) {
         | 
| 85 | 
            -
                    url = url.substring(8);
         | 
| 86 | 
            -
                }
         | 
| 87 | 
            -
                url = decodeURI(url);
         | 
| 88 | 
            -
                g(id).setAttribute("data-clipboard-text", url);
         | 
| 89 | 
            -
                var clipboard = new Clipboard('[data-clipboard-text]')
         | 
| 90 | 
            -
                clipboard.on('success', function (e) {
         | 
| 91 | 
            -
                    g('copyButton').innerHTML = '复制成功';
         | 
| 92 | 
            -
                });
         | 
| 93 | 
            -
            }
         | 
| 1 | 
            +
            /*! UEditorPlus v2.0.0*/
         | 
| 2 | 
            +
            function addUploadButtonListener(){g("saveFile").addEventListener("change",function(){$(".image-tip").html("正在转存,请稍后..."),uploader.addFile(this.files),uploader.upload()})}function addOkListener(){dialog.onok=function(){if(imageUrls.length){var a=editor.getOpt("imageUrlPrefix"),b=domUtils.getElementsByTagName(editor.document,"img");editor.fireEvent("saveScene");for(var c,d=0;c=b[d++];){var e=c.getAttribute("data-word-image");if(e)for(var f,g=0;f=imageUrls[g++];)if(e.indexOf(f.name.replace(" ",""))!=-1){c.src=a+f.url,c.setAttribute("_src",a+f.url),c.setAttribute("title",f.title),domUtils.removeAttributes(c,["data-word-image","style","width","height"]),editor.fireEvent("selectionchange");break}}editor.fireEvent("saveScene")}},dialog.oncancel=function(){}}function showLocalPath(a){var b=editor.selection.getRange().getClosedNode(),c=editor.execCommand("wordimage");if(1==c.length||b&&"IMG"==b.tagName)return void(g(a).value=c[0]);var d=c[0],e=d.lastIndexOf("/")||0,f=d.lastIndexOf("\\")||0,h=e>f?"/":"\\";d=d.substring(0,d.lastIndexOf(h)+1),g(a).value=d;for(var i=[],j=0,k=c.length;j<k;j++){var b=c[j];i.push(b.substring(b.lastIndexOf(h)+1,b.length))}$(".image-tip").html('<span style="color:#ff0000;">请选择:'+i.join("、")+"共"+c.length+"个文件</span>")}function createCopyButton(a,b){var c=g(b).value;c.startsWith("file:////")&&(c=c.substring(8)),c=decodeURI(c),g(a).setAttribute("data-clipboard-text",c);var d=new Clipboard("[data-clipboard-text]");d.on("success",function(a){g("copyButton").innerHTML="复制成功"})}var wordImage={},g=$G,flashObj,flashContainer;wordImage.init=function(a,b){showLocalPath("fileUrl"),createCopyButton("copyButton","fileUrl"),addUploadButtonListener(),addOkListener()};
         |