@lingxiteam/lcdp-ueditor-react 1.0.0-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.d.ts +74 -0
- package/es/LcdpUeditor.js +335 -0
- package/es/const.d.ts +12 -0
- package/es/const.js +19 -0
- package/es/defaultConfig.json +77 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +3 -0
- package/es/tools/UeditorResourceLoader.d.ts +21 -0
- package/es/tools/UeditorResourceLoader.js +114 -0
- package/es/tools/loadScript.d.ts +5 -0
- package/es/tools/loadScript.js +54 -0
- package/es/type.d.ts +142 -0
- package/es/type.js +1 -0
- package/package.json +32 -0
- package/ueditor-resource/dialogs/anchor/anchor.html +62 -0
- package/ueditor-resource/dialogs/attachment/attachment.css +716 -0
- package/ueditor-resource/dialogs/attachment/attachment.html +61 -0
- package/ueditor-resource/dialogs/attachment/attachment.js +803 -0
- package/ueditor-resource/dialogs/attachment/images/alignicon.gif +0 -0
- package/ueditor-resource/dialogs/attachment/images/alignicon.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/bg.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/file-icons.gif +0 -0
- package/ueditor-resource/dialogs/attachment/images/file-icons.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/icons.gif +0 -0
- package/ueditor-resource/dialogs/attachment/images/icons.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/image.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/progress.png +0 -0
- package/ueditor-resource/dialogs/attachment/images/success.gif +0 -0
- package/ueditor-resource/dialogs/attachment/images/success.png +0 -0
- package/ueditor-resource/dialogs/audio/audio.css +879 -0
- package/ueditor-resource/dialogs/audio/audio.html +94 -0
- package/ueditor-resource/dialogs/audio/audio.js +815 -0
- package/ueditor-resource/dialogs/audio/icon/center-active.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/center.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/img.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/left-active.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/left.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/none-active.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/none.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/right-active.png +0 -0
- package/ueditor-resource/dialogs/audio/icon/right.png +0 -0
- package/ueditor-resource/dialogs/audio/images/bg.png +0 -0
- package/ueditor-resource/dialogs/audio/images/center_focus.jpg +0 -0
- package/ueditor-resource/dialogs/audio/images/file-icons.gif +0 -0
- package/ueditor-resource/dialogs/audio/images/file-icons.png +0 -0
- package/ueditor-resource/dialogs/audio/images/icons.gif +0 -0
- package/ueditor-resource/dialogs/audio/images/icons.png +0 -0
- package/ueditor-resource/dialogs/audio/images/image.png +0 -0
- package/ueditor-resource/dialogs/audio/images/left_focus.jpg +0 -0
- package/ueditor-resource/dialogs/audio/images/none_focus.jpg +0 -0
- package/ueditor-resource/dialogs/audio/images/progress.png +0 -0
- package/ueditor-resource/dialogs/audio/images/right_focus.jpg +0 -0
- package/ueditor-resource/dialogs/audio/images/success.gif +0 -0
- package/ueditor-resource/dialogs/audio/images/success.png +0 -0
- package/ueditor-resource/dialogs/background/background.css +193 -0
- package/ueditor-resource/dialogs/background/background.html +59 -0
- package/ueditor-resource/dialogs/background/background.js +370 -0
- package/ueditor-resource/dialogs/background/images/bg.png +0 -0
- package/ueditor-resource/dialogs/background/images/success.png +0 -0
- package/ueditor-resource/dialogs/contentimport/contentimport.html +176 -0
- package/ueditor-resource/dialogs/contentimport/contentimport.js +91 -0
- package/ueditor-resource/dialogs/emotion/emotion.css +129 -0
- package/ueditor-resource/dialogs/emotion/emotion.html +70 -0
- package/ueditor-resource/dialogs/emotion/emotion.js +186 -0
- package/ueditor-resource/dialogs/emotion/images/0.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/bface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/cface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/fface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/jxface2.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
- package/ueditor-resource/dialogs/emotion/images/tface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/wface.gif +0 -0
- package/ueditor-resource/dialogs/emotion/images/yface.gif +0 -0
- package/ueditor-resource/dialogs/formula/formula.html +98 -0
- package/ueditor-resource/dialogs/formula/formula.js +147 -0
- package/ueditor-resource/dialogs/help/help.css +37 -0
- package/ueditor-resource/dialogs/help/help.html +82 -0
- package/ueditor-resource/dialogs/help/help.js +57 -0
- package/ueditor-resource/dialogs/image/icon/center-active.png +0 -0
- package/ueditor-resource/dialogs/image/icon/center.png +0 -0
- package/ueditor-resource/dialogs/image/icon/img.png +0 -0
- package/ueditor-resource/dialogs/image/icon/left-active.png +0 -0
- package/ueditor-resource/dialogs/image/icon/left.png +0 -0
- package/ueditor-resource/dialogs/image/icon/none-active.png +0 -0
- package/ueditor-resource/dialogs/image/icon/none.png +0 -0
- package/ueditor-resource/dialogs/image/icon/right-active.png +0 -0
- package/ueditor-resource/dialogs/image/icon/right.png +0 -0
- package/ueditor-resource/dialogs/image/image.css +768 -0
- package/ueditor-resource/dialogs/image/image.html +145 -0
- package/ueditor-resource/dialogs/image/image.js +1060 -0
- package/ueditor-resource/dialogs/image/images/alignicon.jpg +0 -0
- package/ueditor-resource/dialogs/image/images/bg.png +0 -0
- package/ueditor-resource/dialogs/image/images/icons.gif +0 -0
- package/ueditor-resource/dialogs/image/images/icons.png +0 -0
- package/ueditor-resource/dialogs/image/images/image.png +0 -0
- package/ueditor-resource/dialogs/image/images/progress.png +0 -0
- package/ueditor-resource/dialogs/image/images/success.gif +0 -0
- package/ueditor-resource/dialogs/image/images/success.png +0 -0
- package/ueditor-resource/dialogs/insertframe/insertframe.html +135 -0
- package/ueditor-resource/dialogs/internal.js +81 -0
- package/ueditor-resource/dialogs/link/link.html +148 -0
- package/ueditor-resource/dialogs/preview/preview.html +45 -0
- package/ueditor-resource/dialogs/scrawl/images/addimg.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/brush.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/delimg.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/delimgH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/empty.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/emptyH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/eraser.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/redo.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/redoH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/scale.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/scaleH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/size.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/undo.png +0 -0
- package/ueditor-resource/dialogs/scrawl/images/undoH.png +0 -0
- package/ueditor-resource/dialogs/scrawl/scrawl.css +324 -0
- package/ueditor-resource/dialogs/scrawl/scrawl.html +95 -0
- package/ueditor-resource/dialogs/scrawl/scrawl.js +682 -0
- package/ueditor-resource/dialogs/searchreplace/searchreplace.html +144 -0
- package/ueditor-resource/dialogs/searchreplace/searchreplace.js +174 -0
- package/ueditor-resource/dialogs/spechars/spechars.html +42 -0
- package/ueditor-resource/dialogs/spechars/spechars.js +86 -0
- package/ueditor-resource/dialogs/table/dragicon.png +0 -0
- package/ueditor-resource/dialogs/table/edittable.css +85 -0
- package/ueditor-resource/dialogs/table/edittable.html +69 -0
- package/ueditor-resource/dialogs/table/edittable.js +241 -0
- package/ueditor-resource/dialogs/table/edittd.html +62 -0
- package/ueditor-resource/dialogs/table/edittip.html +33 -0
- package/ueditor-resource/dialogs/template/config.js +42 -0
- package/ueditor-resource/dialogs/template/images/bg.gif +0 -0
- package/ueditor-resource/dialogs/template/images/pre0.png +0 -0
- package/ueditor-resource/dialogs/template/images/pre1.png +0 -0
- package/ueditor-resource/dialogs/template/images/pre2.png +0 -0
- package/ueditor-resource/dialogs/template/images/pre3.png +0 -0
- package/ueditor-resource/dialogs/template/images/pre4.png +0 -0
- package/ueditor-resource/dialogs/template/template.css +99 -0
- package/ueditor-resource/dialogs/template/template.html +26 -0
- package/ueditor-resource/dialogs/template/template.js +53 -0
- package/ueditor-resource/dialogs/video/icon/center-active.png +0 -0
- package/ueditor-resource/dialogs/video/icon/center.png +0 -0
- package/ueditor-resource/dialogs/video/icon/img.png +0 -0
- package/ueditor-resource/dialogs/video/icon/left-active.png +0 -0
- package/ueditor-resource/dialogs/video/icon/left.png +0 -0
- package/ueditor-resource/dialogs/video/icon/none-active.png +0 -0
- package/ueditor-resource/dialogs/video/icon/none.png +0 -0
- package/ueditor-resource/dialogs/video/icon/right-active.png +0 -0
- package/ueditor-resource/dialogs/video/icon/right.png +0 -0
- package/ueditor-resource/dialogs/video/images/bg.png +0 -0
- package/ueditor-resource/dialogs/video/images/center_focus.jpg +0 -0
- package/ueditor-resource/dialogs/video/images/file-icons.gif +0 -0
- package/ueditor-resource/dialogs/video/images/file-icons.png +0 -0
- package/ueditor-resource/dialogs/video/images/icons.gif +0 -0
- package/ueditor-resource/dialogs/video/images/icons.png +0 -0
- package/ueditor-resource/dialogs/video/images/image.png +0 -0
- package/ueditor-resource/dialogs/video/images/left_focus.jpg +0 -0
- package/ueditor-resource/dialogs/video/images/none_focus.jpg +0 -0
- package/ueditor-resource/dialogs/video/images/progress.png +0 -0
- package/ueditor-resource/dialogs/video/images/right_focus.jpg +0 -0
- package/ueditor-resource/dialogs/video/images/success.gif +0 -0
- package/ueditor-resource/dialogs/video/images/success.png +0 -0
- package/ueditor-resource/dialogs/video/video.css +909 -0
- package/ueditor-resource/dialogs/video/video.html +115 -0
- package/ueditor-resource/dialogs/video/video.js +867 -0
- package/ueditor-resource/dialogs/wordimage/wordimage.html +221 -0
- package/ueditor-resource/dialogs/wordimage/wordimage.js +93 -0
- package/ueditor-resource/index.html +146 -0
- package/ueditor-resource/lang/en/en.js +686 -0
- package/ueditor-resource/lang/en/images/addimage.png +0 -0
- package/ueditor-resource/lang/en/images/alldeletebtnhoverskin.png +0 -0
- package/ueditor-resource/lang/en/images/alldeletebtnupskin.png +0 -0
- package/ueditor-resource/lang/en/images/background.png +0 -0
- package/ueditor-resource/lang/en/images/button.png +0 -0
- package/ueditor-resource/lang/en/images/copy.png +0 -0
- package/ueditor-resource/lang/en/images/deletedisable.png +0 -0
- package/ueditor-resource/lang/en/images/deleteenable.png +0 -0
- package/ueditor-resource/lang/en/images/listbackground.png +0 -0
- package/ueditor-resource/lang/en/images/localimage.png +0 -0
- package/ueditor-resource/lang/en/images/music.png +0 -0
- package/ueditor-resource/lang/en/images/rotateleftdisable.png +0 -0
- package/ueditor-resource/lang/en/images/rotateleftenable.png +0 -0
- package/ueditor-resource/lang/en/images/rotaterightdisable.png +0 -0
- package/ueditor-resource/lang/en/images/rotaterightenable.png +0 -0
- package/ueditor-resource/lang/en/images/upload.png +0 -0
- package/ueditor-resource/lang/zh-cn/images/copy.png +0 -0
- package/ueditor-resource/lang/zh-cn/images/localimage.png +0 -0
- package/ueditor-resource/lang/zh-cn/images/music.png +0 -0
- package/ueditor-resource/lang/zh-cn/images/upload.png +0 -0
- package/ueditor-resource/lang/zh-cn/zh-cn.js +748 -0
- package/ueditor-resource/plugins/demo/demo.js +3 -0
- package/ueditor-resource/themes/default/css/ueditor.css +2148 -0
- package/ueditor-resource/themes/default/dialog.css +17 -0
- package/ueditor-resource/themes/default/dialogbase.css +132 -0
- package/ueditor-resource/themes/default/exts/ai.svg +12 -0
- package/ueditor-resource/themes/default/exts/apk.svg +12 -0
- package/ueditor-resource/themes/default/exts/chm.svg +12 -0
- package/ueditor-resource/themes/default/exts/css.svg +12 -0
- package/ueditor-resource/themes/default/exts/doc.svg +22 -0
- package/ueditor-resource/themes/default/exts/docx.svg +22 -0
- package/ueditor-resource/themes/default/exts/dwg.svg +16 -0
- package/ueditor-resource/themes/default/exts/folder.svg +3 -0
- package/ueditor-resource/themes/default/exts/gif.svg +14 -0
- package/ueditor-resource/themes/default/exts/html.svg +12 -0
- package/ueditor-resource/themes/default/exts/jpeg.svg +14 -0
- package/ueditor-resource/themes/default/exts/jpg.svg +14 -0
- package/ueditor-resource/themes/default/exts/log.svg +12 -0
- package/ueditor-resource/themes/default/exts/mp3.svg +14 -0
- package/ueditor-resource/themes/default/exts/mp4.svg +12 -0
- package/ueditor-resource/themes/default/exts/pdf.svg +14 -0
- package/ueditor-resource/themes/default/exts/png.svg +14 -0
- package/ueditor-resource/themes/default/exts/ppt.svg +24 -0
- package/ueditor-resource/themes/default/exts/pptx.svg +24 -0
- package/ueditor-resource/themes/default/exts/psd.svg +12 -0
- package/ueditor-resource/themes/default/exts/rar.svg +12 -0
- package/ueditor-resource/themes/default/exts/svg.svg +12 -0
- package/ueditor-resource/themes/default/exts/torrent.svg +14 -0
- package/ueditor-resource/themes/default/exts/txt.svg +14 -0
- package/ueditor-resource/themes/default/exts/unknown.svg +12 -0
- package/ueditor-resource/themes/default/exts/xls.svg +25 -0
- package/ueditor-resource/themes/default/exts/xlsx.svg +25 -0
- package/ueditor-resource/themes/default/exts/zip.svg +12 -0
- package/ueditor-resource/themes/default/images/anchor.gif +0 -0
- package/ueditor-resource/themes/default/images/arrow.png +0 -0
- package/ueditor-resource/themes/default/images/arrow_down.png +0 -0
- package/ueditor-resource/themes/default/images/arrow_up.png +0 -0
- package/ueditor-resource/themes/default/images/button-bg.gif +0 -0
- package/ueditor-resource/themes/default/images/cancelbutton.gif +0 -0
- package/ueditor-resource/themes/default/images/charts.png +0 -0
- package/ueditor-resource/themes/default/images/cursor_h.gif +0 -0
- package/ueditor-resource/themes/default/images/cursor_h.png +0 -0
- package/ueditor-resource/themes/default/images/cursor_v.gif +0 -0
- package/ueditor-resource/themes/default/images/cursor_v.png +0 -0
- package/ueditor-resource/themes/default/images/dialog-title-bg.png +0 -0
- package/ueditor-resource/themes/default/images/filescan.png +0 -0
- package/ueditor-resource/themes/default/images/highlighted.gif +0 -0
- package/ueditor-resource/themes/default/images/icons-all.gif +0 -0
- package/ueditor-resource/themes/default/images/icons.gif +0 -0
- package/ueditor-resource/themes/default/images/icons.png +0 -0
- package/ueditor-resource/themes/default/images/img-cracked.png +0 -0
- package/ueditor-resource/themes/default/images/loaderror.png +0 -0
- package/ueditor-resource/themes/default/images/loading.gif +0 -0
- package/ueditor-resource/themes/default/images/lock.gif +0 -0
- package/ueditor-resource/themes/default/images/neweditor-tab-bg.png +0 -0
- package/ueditor-resource/themes/default/images/pagebreak.gif +0 -0
- package/ueditor-resource/themes/default/images/scale.png +0 -0
- package/ueditor-resource/themes/default/images/sortable.png +0 -0
- package/ueditor-resource/themes/default/images/spacer.gif +0 -0
- package/ueditor-resource/themes/default/images/sparator_v.png +0 -0
- package/ueditor-resource/themes/default/images/table-cell-align.png +0 -0
- package/ueditor-resource/themes/default/images/tangram-colorpicker.png +0 -0
- package/ueditor-resource/themes/default/images/toolbar_bg.png +0 -0
- package/ueditor-resource/themes/default/images/unhighlighted.gif +0 -0
- package/ueditor-resource/themes/default/images/upload.png +0 -0
- package/ueditor-resource/themes/default/images/videologo.gif +0 -0
- package/ueditor-resource/themes/default/images/word.gif +0 -0
- package/ueditor-resource/themes/default/images/wordpaste.png +0 -0
- package/ueditor-resource/themes/iframe.css +63 -0
- package/ueditor-resource/third-party/SyntaxHighlighter/shCore.js +3655 -0
- package/ueditor-resource/third-party/SyntaxHighlighter/shCoreDefault.css +1 -0
- package/ueditor-resource/third-party/clipboard/clipboard.js +753 -0
- package/ueditor-resource/third-party/clipboard/clipboard.swf +0 -0
- package/ueditor-resource/third-party/codemirror/codemirror.css +106 -0
- package/ueditor-resource/third-party/codemirror/codemirror.js +3581 -0
- package/ueditor-resource/third-party/jquery-3.5.1.js +2 -0
- package/ueditor-resource/third-party/jquery-3.5.1_1.js +4314 -0
- package/ueditor-resource/third-party/webuploader/webuploader.css +88 -0
- package/ueditor-resource/third-party/webuploader/webuploader.js +4 -0
- package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.js +1256 -0
- package/ueditor-resource/third-party/zeroclipboard/ZeroClipboard.swf +0 -0
- package/ueditor-resource/ueditor.all.js +32643 -0
- package/ueditor-resource/ueditor.config.js +656 -0
- package/ueditor-resource/ueditor.parse.js +639 -0
| @@ -0,0 +1,221 @@ | |
| 1 | 
            +
            <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
         | 
| 2 | 
            +
                "http://www.w3.org/TR/html4/loose.dtd">
         | 
| 3 | 
            +
            <html>
         | 
| 4 | 
            +
            <head>
         | 
| 5 | 
            +
                <title></title>
         | 
| 6 | 
            +
                <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
         | 
| 7 | 
            +
                <script type="text/javascript" src="../internal.js?32939b8e"></script>
         | 
| 8 | 
            +
                <style type="text/css">
         | 
| 9 | 
            +
                    .wrapper {
         | 
| 10 | 
            +
                        width: 600px;
         | 
| 11 | 
            +
                        padding: 10px;
         | 
| 12 | 
            +
                        height: 352px;
         | 
| 13 | 
            +
                        overflow: hidden;
         | 
| 14 | 
            +
                        position: relative;
         | 
| 15 | 
            +
                        border-bottom: 1px solid #d7d7d7
         | 
| 16 | 
            +
                    }
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                    .wrapper .image-info {
         | 
| 19 | 
            +
                        display: flex;
         | 
| 20 | 
            +
                        align-items: center;
         | 
| 21 | 
            +
                    }
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                    .wrapper .image-info .input {
         | 
| 24 | 
            +
                        flex-grow: 1;
         | 
| 25 | 
            +
                        display: flex;
         | 
| 26 | 
            +
                    }
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                    .wrapper .image-info .input input {
         | 
| 29 | 
            +
                        display: block;
         | 
| 30 | 
            +
                        border: 1px solid #CCC;
         | 
| 31 | 
            +
                        height: 23px;
         | 
| 32 | 
            +
                        border-radius: 3px;
         | 
| 33 | 
            +
                        flex-grow: 1;
         | 
| 34 | 
            +
                        outline: none;
         | 
| 35 | 
            +
                    }
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                    .wrapper .image-info .copy {
         | 
| 38 | 
            +
                        width: 60px;
         | 
| 39 | 
            +
                        cursor: pointer;
         | 
| 40 | 
            +
                        margin: 0 5px;
         | 
| 41 | 
            +
                    }
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                    .wrapper .image-info .copy div {
         | 
| 44 | 
            +
                        height: 30px;
         | 
| 45 | 
            +
                        font-size: 12px;
         | 
| 46 | 
            +
                        line-height: 28px;
         | 
| 47 | 
            +
                        cursor: pointer;
         | 
| 48 | 
            +
                        border-radius: 4px;
         | 
| 49 | 
            +
                        text-align: center;
         | 
| 50 | 
            +
                        background-color: #F8F8F8;
         | 
| 51 | 
            +
                        border: 1px solid #EEE;
         | 
| 52 | 
            +
                    }
         | 
| 53 | 
            +
             | 
| 54 | 
            +
                    .wrapper .image-info .action {
         | 
| 55 | 
            +
                        width: 100px;
         | 
| 56 | 
            +
                        cursor: pointer;
         | 
| 57 | 
            +
                    }
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                    .wrapper .image-info .action .save-from-local {
         | 
| 60 | 
            +
                        position: relative;
         | 
| 61 | 
            +
                        height: 30px;
         | 
| 62 | 
            +
                        font-size: 12px;
         | 
| 63 | 
            +
                        line-height: 28px;
         | 
| 64 | 
            +
                        cursor: pointer;
         | 
| 65 | 
            +
                        border-radius: 4px;
         | 
| 66 | 
            +
                        text-align: center;
         | 
| 67 | 
            +
                        background-color: #F8F8F8;
         | 
| 68 | 
            +
                        border: 1px solid #EEE;
         | 
| 69 | 
            +
                    }
         | 
| 70 | 
            +
             | 
| 71 | 
            +
                    .wrapper .image-info .action .save-from-local input {
         | 
| 72 | 
            +
                        position: absolute;
         | 
| 73 | 
            +
                        left: 0;
         | 
| 74 | 
            +
                        top: 0;
         | 
| 75 | 
            +
                        opacity: 0;
         | 
| 76 | 
            +
                        cursor: pointer;
         | 
| 77 | 
            +
                    }
         | 
| 78 | 
            +
             | 
| 79 | 
            +
                    .wrapper .image-manual {
         | 
| 80 | 
            +
                        background: #EEE;
         | 
| 81 | 
            +
                        padding: 10px;
         | 
| 82 | 
            +
                        border-radius: 5px;
         | 
| 83 | 
            +
                        margin-top: 10px;
         | 
| 84 | 
            +
                        line-height: 2;
         | 
| 85 | 
            +
                    }
         | 
| 86 | 
            +
             | 
| 87 | 
            +
                    .wrapper .image-manual .title {
         | 
| 88 | 
            +
                        font-weight: bold;
         | 
| 89 | 
            +
                        font-size: 120%;
         | 
| 90 | 
            +
                    }
         | 
| 91 | 
            +
             | 
| 92 | 
            +
                    .wrapper .image-manual .body {
         | 
| 93 | 
            +
                    }
         | 
| 94 | 
            +
                </style>
         | 
| 95 | 
            +
            </head>
         | 
| 96 | 
            +
            <body>
         | 
| 97 | 
            +
            <div class="wrapper">
         | 
| 98 | 
            +
                <div class="image-info">
         | 
| 99 | 
            +
                    <div class="input">
         | 
| 100 | 
            +
                        <input type="text" id="fileUrl"/>
         | 
| 101 | 
            +
                    </div>
         | 
| 102 | 
            +
                    <div class="copy">
         | 
| 103 | 
            +
                        <div id="copyButton">复制路径</div>
         | 
| 104 | 
            +
                    </div>
         | 
| 105 | 
            +
                    <div class="action">
         | 
| 106 | 
            +
                        <div class="save-from-local">
         | 
| 107 | 
            +
                            <div>本地选择保存</div>
         | 
| 108 | 
            +
                            <input type="file" id="saveFile" multiple=true/>
         | 
| 109 | 
            +
                        </div>
         | 
| 110 | 
            +
                    </div>
         | 
| 111 | 
            +
                </div>
         | 
| 112 | 
            +
                <div class="image-tip"></div>
         | 
| 113 | 
            +
                <div class="image-manual">
         | 
| 114 | 
            +
                    <div class="title">
         | 
| 115 | 
            +
                        Windows使用教程
         | 
| 116 | 
            +
                    </div>
         | 
| 117 | 
            +
                    <div class="body">
         | 
| 118 | 
            +
                        <p>1、点击复制地址按钮</p>
         | 
| 119 | 
            +
                        <p>2、点击本地选择文件,粘贴剪切板的路径到文件选择路径</p>
         | 
| 120 | 
            +
                        <p>3、点击确定</p>
         | 
| 121 | 
            +
                    </div>
         | 
| 122 | 
            +
                    <div class="title">
         | 
| 123 | 
            +
                        Mac使用教程
         | 
| 124 | 
            +
                    </div>
         | 
| 125 | 
            +
                    <div class="body">
         | 
| 126 | 
            +
                        <p>1、点击复制地址按钮</p>
         | 
| 127 | 
            +
                        <p>2、点击本地选择文件,按快捷 Command+Shift+G ,粘贴剪切板的路径到文件选择路径</p>
         | 
| 128 | 
            +
                        <p>3、点击确定</p>
         | 
| 129 | 
            +
                    </div>
         | 
| 130 | 
            +
                </div>
         | 
| 131 | 
            +
            </div>
         | 
| 132 | 
            +
            <script src="../../third-party/jquery-3.5.1.js?89c36344"></script>
         | 
| 133 | 
            +
            <script src="../../third-party/webuploader/webuploader.js?f37088cc"></script>
         | 
| 134 | 
            +
            <script type="text/javascript" src="../../third-party/clipboard/clipboard.js?7af7cd91"></script>
         | 
| 135 | 
            +
            <script type="text/javascript" src="wordimage.js?61427c9d"></script>
         | 
| 136 | 
            +
            <script type="text/javascript">
         | 
| 137 | 
            +
                editor.setOpt({
         | 
| 138 | 
            +
                    wordImageFieldName: "upfile",
         | 
| 139 | 
            +
                    compressSide: 0,
         | 
| 140 | 
            +
                    maxImageSideLength: 900
         | 
| 141 | 
            +
                });
         | 
| 142 | 
            +
                //全局变量
         | 
| 143 | 
            +
                var imageUrls = [],          //用于保存从服务器返回的图片信息数组
         | 
| 144 | 
            +
                    selectedImageCount = 0,  //当前已选择的但未上传的图片数量
         | 
| 145 | 
            +
                    optImageUrl = editor.getActionUrl(editor.getOpt('imageActionName')),
         | 
| 146 | 
            +
                    optImageFieldName = editor.getOpt('imageFieldName'),
         | 
| 147 | 
            +
                    optImageCompressBorder = editor.getOpt('imageCompressEnable') ? editor.getOpt('imageCompressBorder') : null,
         | 
| 148 | 
            +
                    maxSize = editor.getOpt('imageMaxSize') / 1024 / 1024,
         | 
| 149 | 
            +
                    extension = editor.getOpt('imageAllowFiles').join(';').replace(/\./g, '*.');
         | 
| 150 | 
            +
             | 
| 151 | 
            +
                /* 添加额外的GET参数 */
         | 
| 152 | 
            +
                var params = utils.serializeParam(editor.queryCommandValue('serverparam')) || '',
         | 
| 153 | 
            +
                    urlWidthParams = optImageUrl + (optImageUrl.indexOf('?') == -1 ? '?' : '&') + params;
         | 
| 154 | 
            +
             | 
| 155 | 
            +
                var uploader,
         | 
| 156 | 
            +
                    actionUrl = editor.getActionUrl(editor.getOpt('imageActionName')),
         | 
| 157 | 
            +
                    acceptExtensions = (editor.getOpt('imageAllowFiles') || []).join('').replace(/\./g, ',').replace(/^[,]/, ''),
         | 
| 158 | 
            +
                    imageMaxSize = editor.getOpt('imageMaxSize'),
         | 
| 159 | 
            +
                    imageCompressBorder = editor.getOpt('imageCompressBorder');
         | 
| 160 | 
            +
                uploader = WebUploader.create({
         | 
| 161 | 
            +
                    accept: {
         | 
| 162 | 
            +
                        title: 'Images',
         | 
| 163 | 
            +
                        extensions: acceptExtensions,
         | 
| 164 | 
            +
                        mimeTypes: 'image/*'
         | 
| 165 | 
            +
                    },
         | 
| 166 | 
            +
                    swf: '../../third-party/webuploader/Uploader.swf',
         | 
| 167 | 
            +
                    server: actionUrl,
         | 
| 168 | 
            +
                    fileVal: editor.getOpt('imageFieldName'),
         | 
| 169 | 
            +
                    duplicate: true,
         | 
| 170 | 
            +
                    fileSingleSizeLimit: imageMaxSize,    // 默认 2 M
         | 
| 171 | 
            +
                    threads: 1,
         | 
| 172 | 
            +
                    compress: editor.getOpt('imageCompressEnable') ? {
         | 
| 173 | 
            +
                        width: imageCompressBorder,
         | 
| 174 | 
            +
                        height: imageCompressBorder,
         | 
| 175 | 
            +
                        // 图片质量,只有type为`image/jpeg`的时候才有效。
         | 
| 176 | 
            +
                        quality: 90,
         | 
| 177 | 
            +
                        // 是否允许放大,如果想要生成小图的时候不失真,此选项应该设置为false.
         | 
| 178 | 
            +
                        allowMagnify: false,
         | 
| 179 | 
            +
                        // 是否允许裁剪。
         | 
| 180 | 
            +
                        crop: false,
         | 
| 181 | 
            +
                        // 是否保留头部meta信息。
         | 
| 182 | 
            +
                        preserveHeaders: true
         | 
| 183 | 
            +
                    } : false
         | 
| 184 | 
            +
                });
         | 
| 185 | 
            +
                uploader.on('uploadSuccess', function (file, res) {
         | 
| 186 | 
            +
                    if ('state' in res) {
         | 
| 187 | 
            +
                        if (res.state === 'SUCCESS') {
         | 
| 188 | 
            +
                            if (res.url) {
         | 
| 189 | 
            +
                                imageUrls.push({
         | 
| 190 | 
            +
                                    name: file.name,
         | 
| 191 | 
            +
                                    url: res.url,
         | 
| 192 | 
            +
                                    title: '',
         | 
| 193 | 
            +
                                });
         | 
| 194 | 
            +
                                $('.image-tip').html('<span style="color:#139213;">图片' + imageUrls.length + '(' + file.name + ')' + '转存成功</span>');
         | 
| 195 | 
            +
                            } else {
         | 
| 196 | 
            +
                                $('.image-tip').html('上传失败:' + JSON.stringify(res))
         | 
| 197 | 
            +
                            }
         | 
| 198 | 
            +
                            // 触发上传附件事件
         | 
| 199 | 
            +
                            editor.fireEvent("uploadsuccess", {
         | 
| 200 | 
            +
                                res: res,
         | 
| 201 | 
            +
                                type: 'image'
         | 
| 202 | 
            +
                            });
         | 
| 203 | 
            +
                        } else {
         | 
| 204 | 
            +
                            $('.image-tip').html('上传失败:' + JSON.stringify(res))
         | 
| 205 | 
            +
                        }
         | 
| 206 | 
            +
                    } else {
         | 
| 207 | 
            +
                        $('.image-tip').html('上传失败:' + JSON.stringify(res))
         | 
| 208 | 
            +
                    }
         | 
| 209 | 
            +
                });
         | 
| 210 | 
            +
                uploader.on('uploadFinished', function () {
         | 
| 211 | 
            +
                    $('.image-tip').html('<span style="color:#139213;">转存成功,请提交确认</span>');
         | 
| 212 | 
            +
                });
         | 
| 213 | 
            +
                utils.domReady(function () {
         | 
| 214 | 
            +
                    var options = {};
         | 
| 215 | 
            +
                    var callbacks = {};
         | 
| 216 | 
            +
                    wordImage.init(options, callbacks);
         | 
| 217 | 
            +
                });
         | 
| 218 | 
            +
            </script>
         | 
| 219 | 
            +
             | 
| 220 | 
            +
            </body>
         | 
| 221 | 
            +
            </html>
         | 
| @@ -0,0 +1,93 @@ | |
| 1 | 
            +
            /**
         | 
| 2 | 
            +
             * Created by JetBrains PhpStorm.
         | 
| 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 | 
            +
            }
         | 
| @@ -0,0 +1,146 @@ | |
| 1 | 
            +
            <!doctype html>
         | 
| 2 | 
            +
            <html>
         | 
| 3 | 
            +
            <head>
         | 
| 4 | 
            +
                <title>UEditorPlus 完整演示</title>
         | 
| 5 | 
            +
                <meta name="viewport" content="width=device-width, minimum-scale=0.5, maximum-scale=5, user-scalable=no">
         | 
| 6 | 
            +
                <meta http-equiv="X-UA-Compatible" content="ie=edge">
         | 
| 7 | 
            +
                <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
         | 
| 8 | 
            +
                <script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
         | 
| 9 | 
            +
                <script type="text/javascript" charset="utf-8" src="ueditor.all.js"></script>
         | 
| 10 | 
            +
                <script type="text/javascript" charset="utf-8" src="lang/zh-cn/zh-cn.js?8c5d8442"></script>
         | 
| 11 | 
            +
                <script src="./plugins/demo/demo.js"></script>
         | 
| 12 | 
            +
                <script>
         | 
| 13 | 
            +
                    // window.UEDITOR_CONFIG.toolbars[0].push('undo');
         | 
| 14 | 
            +
                </script>
         | 
| 15 | 
            +
                <script>var _hmt = _hmt || [];
         | 
| 16 | 
            +
                (function () {
         | 
| 17 | 
            +
                    var hm = document.createElement("script");
         | 
| 18 | 
            +
                    hm.src = "https://hm.baidu.com/hm.js?f84f35a44b5cc5c0b10c3fabdf0f322b";
         | 
| 19 | 
            +
                    var s = document.getElementsByTagName("script")[0];
         | 
| 20 | 
            +
                    s.parentNode.insertBefore(hm, s);
         | 
| 21 | 
            +
                })();</script>
         | 
| 22 | 
            +
                <style>
         | 
| 23 | 
            +
                    :root {
         | 
| 24 | 
            +
                        /*--ueditor-top-offset: 20px;*/
         | 
| 25 | 
            +
                    }
         | 
| 26 | 
            +
                </style>
         | 
| 27 | 
            +
                <link rel="stylesheet" href="./style.css"/>
         | 
| 28 | 
            +
            </head>
         | 
| 29 | 
            +
            <body class="demo-editor-page">
         | 
| 30 | 
            +
            <div>
         | 
| 31 | 
            +
                <h1>完整示例</h1>
         | 
| 32 | 
            +
                <div>
         | 
| 33 | 
            +
                    <script id="editor" type="text/plain" style="height:300px;">
         | 
| 34 | 
            +
            <h1>
         | 
| 35 | 
            +
                你好 UEditorPlus
         | 
| 36 | 
            +
            </h1>
         | 
| 37 | 
            +
            <p>
         | 
| 38 | 
            +
                UEditorPlus 是基于 UEditor 二次开发的富文本编辑器,让 UEditor <span style="color: #E36C09;">焕<span style="color: #0070C0;">然</span><span style="color: #31859B;"><span style="color: #00B050;">一</span><span style="color: #FF0000;">新</span></span></span>
         | 
| 39 | 
            +
            </p>
         | 
| 40 | 
            +
             | 
| 41 | 
            +
            <table data-sort="sortDisabled">
         | 
| 42 | 
            +
                <tbody>
         | 
| 43 | 
            +
                    <tr class="firstRow">
         | 
| 44 | 
            +
                        <td valign="top" style="word-break: break-all;" rowspan="1" colspan="3">
         | 
| 45 | 
            +
                            我是表格
         | 
| 46 | 
            +
                        </td>
         | 
| 47 | 
            +
                    </tr>
         | 
| 48 | 
            +
                    <tr>
         | 
| 49 | 
            +
                        <td width="273" valign="top" style="word-break: break-all;">
         | 
| 50 | 
            +
                            如果
         | 
| 51 | 
            +
                        </td>
         | 
| 52 | 
            +
                        <td width="273" valign="top" style="word-break: break-all;">
         | 
| 53 | 
            +
                            有一天
         | 
| 54 | 
            +
                        </td>
         | 
| 55 | 
            +
                        <td width="273" valign="top" style="word-break: break-all;">
         | 
| 56 | 
            +
                            我离开了
         | 
| 57 | 
            +
                        </td>
         | 
| 58 | 
            +
                    </tr>
         | 
| 59 | 
            +
                    <tr>
         | 
| 60 | 
            +
                        <td valign="top" colspan="1" rowspan="1" style="word-break: break-all;">
         | 
| 61 | 
            +
                            怎么才能
         | 
| 62 | 
            +
                        </td>
         | 
| 63 | 
            +
                        <td valign="top" colspan="1" rowspan="1" style="word-break: break-all;">
         | 
| 64 | 
            +
                            证明我
         | 
| 65 | 
            +
                        </td>
         | 
| 66 | 
            +
                        <td valign="top" colspan="1" rowspan="1" style="word-break: break-all;">
         | 
| 67 | 
            +
                            曾经来过
         | 
| 68 | 
            +
                        </td>
         | 
| 69 | 
            +
                    </tr>
         | 
| 70 | 
            +
                </tbody>
         | 
| 71 | 
            +
            </table>
         | 
| 72 | 
            +
            <pre class="brush:html;toolbar:false"><div>
         | 
| 73 | 
            +
              <span>这里是HTML标签</span>
         | 
| 74 | 
            +
            </div></pre>
         | 
| 75 | 
            +
            <h2>
         | 
| 76 | 
            +
            公式支持
         | 
| 77 | 
            +
            </h2>
         | 
| 78 | 
            +
            <p>
         | 
| 79 | 
            +
                <img src="https://r.latexeasy.com/image.svg?%5Cint%20%5Cfrac%7B1%7D%7Bx%7D%20dx%20%3D%20%5Cln%20%5Cleft%7C%20x%20%5Cright%7C%20%2B%20C"
         | 
| 80 | 
            +
                  data-formula-image="%5Cint%20%5Cfrac%7B1%7D%7Bx%7D%20dx%20%3D%20%5Cln%20%5Cleft%7C%20x%20%5Cright%7C%20%2B%20C"/>
         | 
| 81 | 
            +
            </p>
         | 
| 82 | 
            +
            <p>
         | 
| 83 | 
            +
                <br/>
         | 
| 84 | 
            +
            </p>
         | 
| 85 | 
            +
             | 
| 86 | 
            +
                    </script>
         | 
| 87 | 
            +
                </div>
         | 
| 88 | 
            +
                <div id="btns" style="margin-top:20px;">
         | 
| 89 | 
            +
                    <div>
         | 
| 90 | 
            +
             | 
| 91 | 
            +
                        <button onclick="alert(UE.getEditor('editor').getAllHtml())">获得整个html的内容</button>
         | 
| 92 | 
            +
                        <button onclick="alert(UE.getEditor('editor').getContent())">获得内容</button>
         | 
| 93 | 
            +
                        <button onclick="UE.getEditor('editor').setContent('<p>欢迎使用 UEditorPlus</p>', false)">写入内容</button>
         | 
| 94 | 
            +
                        <button onclick="UE.getEditor('editor').setContent('<p>欢迎使用 UEditorPlus</p>', true)">追加内容</button>
         | 
| 95 | 
            +
                        <button onclick="alert(UE.getEditor('editor').getContentTxt())">获得纯文本</button>
         | 
| 96 | 
            +
                        <button onclick="alert(UE.getEditor('editor').getPlainTxt())">获得带格式的纯文本</button>
         | 
| 97 | 
            +
                        <button onclick="alert(UE.getEditor('editor').hasContents())">判断是否有内容</button>
         | 
| 98 | 
            +
                        <button onclick="UE.getEditor('editor').focus()">使编辑器获得焦点</button>
         | 
| 99 | 
            +
                        <button onmousedown="isFocus()">编辑器是否获得焦点</button>
         | 
| 100 | 
            +
                        <button onmousedown="setBlur()">编辑器失去焦点</button>
         | 
| 101 | 
            +
                        <button onclick="getSelectText()">获得当前选中的文本</button>
         | 
| 102 | 
            +
                        <button onclick="UE.getEditor('editor').execCommand('insertHtml', '插入的内容')">插入内容</button>
         | 
| 103 | 
            +
                        <button onclick="UE.getEditor('editor').setEnabled()">设定可编辑</button>
         | 
| 104 | 
            +
                        <button onclick="UE.getEditor('editor').setDisabled('fullscreen')">设定不可编辑</button>
         | 
| 105 | 
            +
                        <button onclick="UE.getEditor('editor').setHide()">隐藏编辑器</button>
         | 
| 106 | 
            +
                        <button onclick="UE.getEditor('editor').setShow()">显示编辑器</button>
         | 
| 107 | 
            +
                        <button onclick="UE.getEditor('editor').setHeight(300)">设置固定高度</button>
         | 
| 108 | 
            +
                        <button onclick="UE.getEditor('editor')">创建编辑器</button>
         | 
| 109 | 
            +
                        <button onclick="UE.getEditor('editor').destroy()">销毁编辑器</button>
         | 
| 110 | 
            +
                        <button onclick="alert( UE.getEditor('editor').execCommand('get_auto_save_content') )">草稿箱-获取</button>
         | 
| 111 | 
            +
                        <button onclick="UE.getEditor('editor').execCommand('clear_auto_save_content'); alert('已清空草稿箱')">草稿箱-清空
         | 
| 112 | 
            +
                        </button>
         | 
| 113 | 
            +
                        <button onclick="UE.getEditor('editor').execCommand('set_auto_save_content'); alert('已保存')">草稿箱-立即保存
         | 
| 114 | 
            +
                        </button>
         | 
| 115 | 
            +
                        <button onclick="UE.getEditor('editor').execCommand('auto_save_restore')">草稿箱-恢复到编辑器</button>
         | 
| 116 | 
            +
                    </div>
         | 
| 117 | 
            +
                </div>
         | 
| 118 | 
            +
             | 
| 119 | 
            +
                <script type="text/javascript">
         | 
| 120 | 
            +
                    var ue = UE.getEditor('editor',{
         | 
| 121 | 
            +
                        // autoHeightEnabled: false,
         | 
| 122 | 
            +
                    });
         | 
| 123 | 
            +
                    ue.on('contentchange', function () {
         | 
| 124 | 
            +
                        // console.log('contentchange', ue.getContent());
         | 
| 125 | 
            +
                    });
         | 
| 126 | 
            +
             | 
| 127 | 
            +
                    function isFocus(e) {
         | 
| 128 | 
            +
                        alert(UE.getEditor('editor').isFocus());
         | 
| 129 | 
            +
                        UE.dom.domUtils.preventDefault(e)
         | 
| 130 | 
            +
                    }
         | 
| 131 | 
            +
             | 
| 132 | 
            +
                    function setBlur(e) {
         | 
| 133 | 
            +
                        UE.getEditor('editor').blur();
         | 
| 134 | 
            +
                        UE.dom.domUtils.preventDefault(e)
         | 
| 135 | 
            +
                    }
         | 
| 136 | 
            +
             | 
| 137 | 
            +
                    function getSelectText() {
         | 
| 138 | 
            +
                        var range = UE.getEditor('editor').selection.getRange();
         | 
| 139 | 
            +
                        range.select();
         | 
| 140 | 
            +
                        var txt = UE.getEditor('editor').selection.getText();
         | 
| 141 | 
            +
                        alert(txt)
         | 
| 142 | 
            +
                    }
         | 
| 143 | 
            +
                </script>
         | 
| 144 | 
            +
            </div>
         | 
| 145 | 
            +
            </body>
         | 
| 146 | 
            +
            </html>
         |