longyi 1 рік тому
батько
коміт
79e0a3d46c
100 змінених файлів з 55747 додано та 0 видалено
  1. 4 0
      .gitignore
  2. 27 0
      style/Editor/Editor.css
  3. 24134 0
      style/Editor/Editor.js
  4. 87 0
      style/NEWUM/dialogs/emotion/emotion.css
  5. 272 0
      style/NEWUM/dialogs/emotion/emotion.js
  6. BIN
      style/NEWUM/dialogs/emotion/images/0.gif
  7. BIN
      style/NEWUM/dialogs/emotion/images/bface.gif
  8. BIN
      style/NEWUM/dialogs/emotion/images/cface.gif
  9. BIN
      style/NEWUM/dialogs/emotion/images/fface.gif
  10. BIN
      style/NEWUM/dialogs/emotion/images/jxface2.gif
  11. BIN
      style/NEWUM/dialogs/emotion/images/neweditor-tab-bg.png
  12. BIN
      style/NEWUM/dialogs/emotion/images/tface.gif
  13. BIN
      style/NEWUM/dialogs/emotion/images/wface.gif
  14. BIN
      style/NEWUM/dialogs/emotion/images/yface.gif
  15. 32 0
      style/NEWUM/dialogs/formula/formula.css
  16. 212 0
      style/NEWUM/dialogs/formula/formula.html
  17. 124 0
      style/NEWUM/dialogs/formula/formula.js
  18. BIN
      style/NEWUM/dialogs/formula/images/formula.png
  19. 42 0
      style/NEWUM/dialogs/image/image.css
  20. 445 0
      style/NEWUM/dialogs/image/image.js
  21. BIN
      style/NEWUM/dialogs/image/images/close.png
  22. BIN
      style/NEWUM/dialogs/image/images/upload1.png
  23. BIN
      style/NEWUM/dialogs/image/images/upload2.png
  24. 73 0
      style/NEWUM/dialogs/link/link.js
  25. 148 0
      style/NEWUM/dialogs/map/map.html
  26. 263 0
      style/NEWUM/dialogs/map/map.js
  27. BIN
      style/NEWUM/dialogs/video/images/center_focus.jpg
  28. BIN
      style/NEWUM/dialogs/video/images/left_focus.jpg
  29. BIN
      style/NEWUM/dialogs/video/images/none_focus.jpg
  30. BIN
      style/NEWUM/dialogs/video/images/right_focus.jpg
  31. 59 0
      style/NEWUM/dialogs/video/video.css
  32. 282 0
      style/NEWUM/dialogs/video/video.js
  33. 277 0
      style/NEWUM/index.html
  34. 150 0
      style/NEWUM/lang/en/en.js
  35. BIN
      style/NEWUM/lang/en/images/addimage.png
  36. BIN
      style/NEWUM/lang/en/images/alldeletebtnhoverskin.png
  37. BIN
      style/NEWUM/lang/en/images/alldeletebtnupskin.png
  38. BIN
      style/NEWUM/lang/en/images/background.png
  39. BIN
      style/NEWUM/lang/en/images/button.png
  40. BIN
      style/NEWUM/lang/en/images/copy.png
  41. BIN
      style/NEWUM/lang/en/images/deletedisable.png
  42. BIN
      style/NEWUM/lang/en/images/deleteenable.png
  43. BIN
      style/NEWUM/lang/en/images/imglabel.png
  44. BIN
      style/NEWUM/lang/en/images/listbackground.png
  45. BIN
      style/NEWUM/lang/en/images/localimage.png
  46. BIN
      style/NEWUM/lang/en/images/music.png
  47. BIN
      style/NEWUM/lang/en/images/rotateleftdisable.png
  48. BIN
      style/NEWUM/lang/en/images/rotateleftenable.png
  49. BIN
      style/NEWUM/lang/en/images/rotaterightdisable.png
  50. BIN
      style/NEWUM/lang/en/images/rotaterightenable.png
  51. BIN
      style/NEWUM/lang/en/images/upload.png
  52. BIN
      style/NEWUM/lang/zh-cn/images/copy.png
  53. BIN
      style/NEWUM/lang/zh-cn/images/imglabel.png
  54. BIN
      style/NEWUM/lang/zh-cn/images/localimage.png
  55. BIN
      style/NEWUM/lang/zh-cn/images/music.png
  56. BIN
      style/NEWUM/lang/zh-cn/images/upload.png
  57. 150 0
      style/NEWUM/lang/zh-cn/zh-cn.js
  58. 773 0
      style/NEWUM/themes/default/css/umeditor.css
  59. 8 0
      style/NEWUM/themes/default/css/umeditor.min.css
  60. BIN
      style/NEWUM/themes/default/images/caret.png
  61. BIN
      style/NEWUM/themes/default/images/close.png
  62. BIN
      style/NEWUM/themes/default/images/icons.gif
  63. BIN
      style/NEWUM/themes/default/images/icons.png
  64. BIN
      style/NEWUM/themes/default/images/ok.gif
  65. BIN
      style/NEWUM/themes/default/images/pop-bg.png
  66. BIN
      style/NEWUM/themes/default/images/spacer.gif
  67. BIN
      style/NEWUM/themes/default/images/videologo.gif
  68. 6 0
      style/NEWUM/third-party/jquery.min.js
  69. BIN
      style/NEWUM/third-party/mathquill/font/Symbola.eot
  70. BIN
      style/NEWUM/third-party/mathquill/font/Symbola.otf
  71. 5102 0
      style/NEWUM/third-party/mathquill/font/Symbola.svg
  72. BIN
      style/NEWUM/third-party/mathquill/font/Symbola.ttf
  73. BIN
      style/NEWUM/third-party/mathquill/font/Symbola.woff
  74. 103 0
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/STIXFontLicense2010.txt
  75. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.eot
  76. 3318 0
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.svg
  77. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.ttf
  78. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.woff
  79. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.eot
  80. 1738 0
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.svg
  81. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.ttf
  82. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.woff
  83. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.eot
  84. 1137 0
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.svg
  85. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.ttf
  86. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.woff
  87. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.eot
  88. 1089 0
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.svg
  89. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.ttf
  90. BIN
      style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.woff
  91. 357 0
      style/NEWUM/third-party/mathquill/mathquill.css
  92. 3888 0
      style/NEWUM/third-party/mathquill/mathquill.js
  93. 2 0
      style/NEWUM/third-party/mathquill/mathquill.min.js
  94. 250 0
      style/NEWUM/umeditor.config.js
  95. 10923 0
      style/NEWUM/umeditor.js
  96. 264 0
      style/NEWUM/umeditor.min.js
  97. BIN
      style/NEWUM/umeditor1_2_2-utf8.zip
  98. 8 0
      style/UM/css/umeditor.min.css
  99. BIN
      style/UM/img/caret.png
  100. 0 0
      style/UM/img/close.png

+ 4 - 0
.gitignore

@@ -0,0 +1,4 @@
+data/*
+tmp/*
+
+.htaccess

Різницю між файлами не показано, бо вона завелика
+ 27 - 0
style/Editor/Editor.css


Різницю між файлами не показано, бо вона завелика
+ 24134 - 0
style/Editor/Editor.js


+ 87 - 0
style/NEWUM/dialogs/emotion/emotion.css

@@ -0,0 +1,87 @@
+.edui-popup-emotion .edui-emotion-jd img{
+    background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+.edui-popup-emotion .edui-emotion-pp img{
+    background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:25px;height:25px;display:block;
+}
+
+.edui-popup-emotion .edui-emotion-ldw img{
+    background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+
+.edui-popup-emotion .edui-emotion-tsj img{
+    background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+
+.edui-popup-emotion .edui-emotion-cat img{
+    background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+
+.edui-popup-emotion .edui-emotion-bb img{
+    background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+
+.edui-popup-emotion .edui-emotion-youa img{
+    background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
+    cursor:pointer;width:35px;height:35px;display:block;
+}
+
+.edui-popup-emotion .edui-emotion-smileytable {
+    width: 100%;
+    border-spacing: 0;
+    border-collapse: collapse;
+    table-layout: fixed;
+}
+
+.edui-popup-emotion .edui-emotion-wrapper {
+    padding: 15px;
+}
+
+.edui-popup-emotion .edui-tab-nav{
+    height: auto;
+    *height: 31px;
+}
+.edui-popup-emotion .edui-emotion-tabs{
+    clear: both;
+    width: 0;
+    height: 0;
+}
+
+.edui-popup-emotion .edui-tab-content {
+    padding: 15px 0;
+}
+
+.edui-popup-emotion .edui-emotion-preview-box {
+    width:90px;
+    height:76px;
+    border:2px solid #9cb945;
+    background:#FFFFFF;
+    background-position:center;
+    background-repeat:no-repeat;
+    position: absolute;
+    top: 67px;
+    left: 494px;
+    display: none;
+}
+
+.edui-popup-emotion .edui-tab-text {
+    font-size: 12px;
+}
+
+.edui-popup-emotion .edui-emotion-preview-left {
+    left: 15px;
+}
+
+.edui-popup-emotion .edui-emotion-preview-img {
+    width: 100%;
+    height: 100%;
+    display: block;
+    background-repeat: no-repeat;
+    background-position: center center;
+}

Різницю між файлами не показано, бо вона завелика
+ 272 - 0
style/NEWUM/dialogs/emotion/emotion.js


BIN
style/NEWUM/dialogs/emotion/images/0.gif


BIN
style/NEWUM/dialogs/emotion/images/bface.gif


BIN
style/NEWUM/dialogs/emotion/images/cface.gif


BIN
style/NEWUM/dialogs/emotion/images/fface.gif


BIN
style/NEWUM/dialogs/emotion/images/jxface2.gif


BIN
style/NEWUM/dialogs/emotion/images/neweditor-tab-bg.png


BIN
style/NEWUM/dialogs/emotion/images/tface.gif


BIN
style/NEWUM/dialogs/emotion/images/wface.gif


BIN
style/NEWUM/dialogs/emotion/images/yface.gif


+ 32 - 0
style/NEWUM/dialogs/formula/formula.css

@@ -0,0 +1,32 @@
+.edui-popup-formula .edui-formula-wrapper {
+    padding: 15px;
+}
+.edui-popup-formula .edui-formula-wrapper .edui-tab-nav{
+    height: auto;
+    *height: 31px;
+}
+.edui-popup-formula .edui-formula-wrapper .edui-tab-text {
+    font-size: 12px;
+}
+.edui-popup-formula .edui-formula-wrapper .edui-formula-clearboth {
+    clear: both;
+    width: 0;
+    height: 0;
+}
+.edui-popup-formula .edui-formula-wrapper .edui-tab-pane ul {
+    margin: 0px;
+    padding: 0px;
+}
+.edui-popup-formula .edui-formula-wrapper .edui-tab-content {
+    padding: 5px 0px 0px 0px;
+}
+.edui-popup-formula .edui-formula-wrapper .edui-tab-pane .edui-formula-latex-item {
+    display: block;
+    float: left;
+    margin: 0px 3px 3px 0px;
+    width: 30px;
+    height: 30px;
+    border:1px solid #cccccc;
+    background-image: url("images/formula.png");
+    cursor: pointer;
+}

+ 212 - 0
style/NEWUM/dialogs/formula/formula.html

@@ -0,0 +1,212 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Document</title>
+    <link rel="stylesheet" href="../../third-party/mathquill/mathquill.css"/>
+    <style>
+        html, body, .main{
+            margin: 0;
+            padding: 0;
+            overflow: hidden;
+        }
+        .main{
+            width:1024px;
+            height:1024px;
+        }
+        .mathquill-editable,
+        .mathquill-rendered-math{
+            border: 0px;
+            padding: 0px;
+            margin:4px;
+        }
+    </style>
+</head>
+<body>
+
+<div class="main">
+    <div class="mathquill-editable"></div>
+</div>
+
+<div>
+    <input id="blurHelper" />
+</div>
+
+<script src="../../third-party/jquery.min.js"></script>
+<script src="../../third-party/mathquill/mathquill.js"></script>
+<script>
+    $(function(){
+
+        var UM = parent.UM,
+            $iframe = $(getSelfIframe()),
+            editorId = $iframe.parents('.edui-body-container').attr('id'),
+            editor = UM.getEditor(editorId),
+            timer;
+
+        /* 获得当前公式所在的iframe节点 */
+        function getSelfIframe(){
+            var iframes = parent.document.getElementsByTagName('iframe');
+            for (var key in iframes) {
+                if (iframes[key].contentWindow == window) {
+                    return iframes[key];
+                }
+            }
+            return null;
+        }
+        /* 获得当前url上的hash存储的参数值 */
+        function getLatex() {
+            return $iframe.attr('data-latex') || '';
+        }
+        /* 保存场景 */
+        function saveScene(){
+            timer && clearTimeout(timer);
+            timer = setTimeout(function(){
+                editor.fireEvent('savescene');
+                editor.fireEvent('contentchange');
+                editor.fireEvent('selectionchange');
+                timer = null;
+            }, 300);
+        }
+        /* 设置编辑器可编辑 */
+        function enableEditor(){
+            if(editor.body.contentEditable == 'false') {
+                editor.setEnabled();
+            }
+        }
+        /* 设置编辑器不可编辑 */
+        function disableEditor(){
+            if(editor.body.contentEditable == 'true') {
+                editor.setDisabled(['undo', 'redo', 'preview', 'formula'], true);
+            }
+        }
+
+        /* 公式 */
+        var Formula = function(){
+            var _this = this,
+                latex = getLatex();
+
+            this.isFocus = false;
+            this.isDisabled = false;
+
+            /* 加载公式内容 */
+            this.$mathquill = $('.mathquill-editable').mathquill('latex', latex);
+
+            /* 设置活动状态的公式iframe */
+            this.$mathquill.on('mousedown', function(){
+                /* 编辑器不可用时,公式也不可用 */
+                if(_this.disabled) return false;
+
+                /* 第一次点击当前公式,设置公式活动 */
+                if(!$iframe.hasClass('edui-formula-active')) {
+                    disableEditor();
+                    editor.blur();
+                    editor.$body.find('iframe').not($iframe).each(function(k, v){
+                        v.contentWindow.formula.blur();
+                    });
+                    if(_this.$mathquill.find('.cursor').css('display') == 'none') {
+                        _this.refresh();
+                        _this.$mathquill.addClass('hasCursor');
+                    }
+                }
+                _this.focus();
+            });
+            editor.addListener('click', function(){
+                _this.blur();
+                enableEditor();
+            });
+
+            /* 里面focus,编辑器也判断为focus */
+            editor.addListener('isFocus', function(){
+                return _this.isFocus;
+            });
+            /* um不可用,公式也不可编辑 */
+            editor.addListener('setDisabled', function(type, except){
+                if (!(except && except.join(' ').indexOf('formula') != -1) && _this.isDisabled != true ) {
+                    _this.setDisabled();
+                }
+            });
+            editor.addListener('setEnabled', function(){
+                if (_this.isDisabled != false) {
+                    _this.setEnabled();
+                }
+            });
+
+            /* 设置更新外层iframe的大小和属性 */
+            $(document.body).on('keydown', function(){
+                _this.updateIframe();
+            }).on('keyup', function(){
+                _this.updateIframe();
+            });
+
+            /* 清除初始化的高亮状态 */
+            this.$mathquill.removeClass('hasCursor');
+
+            /* 初始化后延迟刷新外层iframe大小 */
+            setTimeout(function(){
+                _this.updateIframe();
+            }, 300);
+        };
+
+        Formula.prototype = {
+            focus:function(){
+                $iframe.addClass('edui-formula-active');
+                this.isFocus = true;
+            },
+            blur:function(){
+                $iframe.removeClass('edui-formula-active');
+                this.removeCursor();
+                this.isFocus = false;
+            },
+            removeCursor: function(){
+                this.$mathquill.find('span.cursor').hide();
+                this.$mathquill.parent().find('.hasCursor').removeClass('hasCursor');
+            },
+            updateIframe: function(){
+                $iframe.width(this.$mathquill.width()+8).height(this.$mathquill.height()+8);
+                var latex = $iframe.attr('data-latex'),
+                    newLatex = this.getLatex();
+                if(latex != newLatex) {
+                    $iframe.attr('data-latex', this.getLatex());
+                    saveScene();
+                }
+            },
+            insertLatex: function(latex){
+                this.$mathquill.mathquill('write', latex);
+                this.updateIframe();
+                this.removeCursor();
+            },
+            setLatex: function(latex){
+                this.$mathquill.mathquill('latex', latex);
+                this.updateIframe();
+            },
+            getLatex: function(){
+                return this.$mathquill.mathquill('latex');
+            },
+            redraw: function(){
+                this.$mathquill.mathquill('redraw');
+            },
+            setDisabled: function(){
+                this.blur();
+                var latex = this.getLatex();
+                this.$mathquill.mathquill('revert').text(latex).mathquill();
+                this.updateIframe();
+                this.isDisabled = true;
+            },
+            setEnabled: function(){
+                this.$mathquill.removeClass('mathquill-rendered-math');
+                this.refresh();
+                this.isDisabled = false;
+            },
+            refresh: function(){
+                var latex = this.getLatex();
+                this.$mathquill.mathquill('revert').text(latex).mathquill('editable');
+                this.updateIframe();
+            }
+        };
+
+        /* 绑定到window上,给上级window调用 */
+        window.formula = new Formula();
+    });
+</script>
+</body>
+</html>

+ 124 - 0
style/NEWUM/dialogs/formula/formula.js

@@ -0,0 +1,124 @@
+(function () {
+
+    var editor = null;
+
+    UM.registerWidget('formula', {
+
+        tpl: "<link type=\"text/css\" rel=\"stylesheet\" href=\"<%=formula_url%>formula.css\">" +
+            "<div class=\"edui-formula-wrapper\">" +
+            "<ul class=\"edui-tab-nav\"></ul>" +
+            "<div class=\"edui-tab-content\"></div>" +
+            "</div>",
+
+        sourceData: {
+            formula: {
+                'common': [
+                    "{/}frac{ }{ }", "^{ }/_{ }", "x^{ }", "x_{ }", "x^{ }_{ }", "{/}bar{ }", "{/}sqrt{ }", "{/}nthroot{ }{ }",
+                    "{/}sum^{ }_{n=}", "{/}sum", "{/}log_{ }", "{/}ln", "{/}int_{ }^{ }", "{/}oint_{ }^{ }"
+                ],
+                'symbol': [
+                    "+", "-", "{/}pm", "{/}times", "{/}ast", "{/}div", "/", "{/}bigtriangleup",
+                    "=", "{/}ne", "{/}approx", ">", "<", "{/}ge", "{/}le", "{/}infty",
+                    "{/}cap", "{/}cup", "{/}because", "{/}therefore", "{/}subset", "{/}supset", "{/}subseteq", "{/}supseteq",
+                    "{/}nsubseteq", "{/}nsupseteq", "{/}in", "{/}ni", "{/}notin", "{/}mapsto", "{/}leftarrow", "{/}rightarrow",
+                    "{/}Leftarrow", "{/}Rightarrow", "{/}leftrightarrow", "{/}Leftrightarrow"
+                ],
+                'letter': [
+                    "{/}alpha", "{/}beta", "{/}gamma", "{/}delta", "{/}varepsilon", "{/}varphi", "{/}lambda", "{/}mu",
+                    "{/}rho", "{/}sigma", "{/}omega", "{/}Gamma", "{/}Delta", "{/}Theta", "{/}Lambda", "{/}Xi",
+                    "{/}Pi", "{/}Sigma", "{/}Upsilon", "{/}Phi", "{/}Psi", "{/}Omega"
+                ]
+            }
+        },
+        initContent: function (_editor, $widget) {
+
+            var me = this,
+                formula = me.sourceData.formula,
+                lang = _editor.getLang('formula').static,
+                formulaUrl = UMEDITOR_CONFIG.UMEDITOR_HOME_URL + 'dialogs/formula/',
+                options = $.extend({}, lang, { 'formula_url': formulaUrl }),
+                $root = me.root();
+
+            if (me.inited) {
+                me.preventDefault();
+                return;
+            }
+            me.inited = true;
+
+            editor = _editor;
+            me.$widget = $widget;
+
+            $root.html($.parseTmpl(me.tpl, options));
+            me.tabs = $.eduitab({selector: "#edui-formula-tab-Jpanel"});
+
+            /* 初始化popup的内容 */
+            var headHtml = [], xMax = 0, yMax = 0,
+                $tabContent = me.root().find('.edui-tab-content');
+            $.each(formula, function (k, v) {
+                var contentHtml = [];
+                $.each(v, function (i, f) {
+                    contentHtml.push('<li class="edui-formula-latex-item" data-latex="' + f + '" style="background-position:-' + (xMax * 30) + 'px -' + (yMax * 30) + 'px"></li>');
+                    if (++xMax >=8) {
+                        ++yMax; xMax = 0;
+                    }
+                });
+                yMax++; xMax = 0;
+                $tabContent.append('<div class="edui-tab-pane"><ul>' + contentHtml.join('') + '</ul>');
+                headHtml.push('<li class="edui-tab-item"><a href="javascript:void(0);" class="edui-tab-text">' + lang['lang_tab_' + k] + '</a></li>');
+            });
+            headHtml.push('<li class="edui-formula-clearboth"></li>');
+            $root.find('.edui-tab-nav').html(headHtml.join(''));
+            $root.find('.edui-tab-content').append('<div class="edui-formula-clearboth"></div>');
+
+            /* 选中第一个tab */
+            me.switchTab(0);
+        },
+        initEvent: function () {
+            var me = this;
+
+            //防止点击过后关闭popup
+            me.root().on('click', function (e) {
+                return false;
+            });
+
+            //点击tab切换菜单
+            me.root().find('.edui-tab-nav').delegate('.edui-tab-item', 'click', function (evt) {
+                me.switchTab(this);
+                return false;
+            });
+
+            //点击选中公式
+            me.root().find('.edui-tab-pane').delegate('.edui-formula-latex-item', 'click', function (evt) {
+                var $item = $(this),
+                    latex = $item.attr('data-latex') || '';
+
+                if (latex) {
+                    me.insertLatex(latex.replace("{/}", "\\"));
+                }
+                me.$widget.edui().hide();
+                return false;
+            });
+        },
+        switchTab:function(index){
+            var me = this,
+                $root = me.root(),
+                index = $.isNumeric(index) ? index:$.inArray(index, $root.find('.edui-tab-nav .edui-tab-item'));
+
+            $root.find('.edui-tab-nav .edui-tab-item').removeClass('edui-active').eq(index).addClass('edui-active');
+            $root.find('.edui-tab-content .edui-tab-pane').removeClass('edui-active').eq(index).addClass('edui-active');
+
+            /* 自动长高 */
+            me.autoHeight(0);
+        },
+        autoHeight: function () {
+            this.$widget.height(this.root() + 2);
+        },
+        insertLatex: function (latex) {
+            editor.execCommand('formula', latex );
+        },
+        width: 350,
+        height: 400
+    });
+
+})();
+

BIN
style/NEWUM/dialogs/formula/images/formula.png


+ 42 - 0
style/NEWUM/dialogs/image/image.css

@@ -0,0 +1,42 @@
+.edui-dialog-image .edui-image-wrapper{font-size: 12px;margin: 15px;}
+
+/*upload*/
+.edui-dialog-image .edui-image-upload1{position: absolute;top:50%;left:50%;width:44px;height:38px;margin-top:-19px; margin-left: -22px;}
+.edui-dialog-image .edui-image-upload2{position:relative;float:left;width:120px;height:120px;margin:5px 0 0 5px;}
+
+.edui-dialog-image .edui-image-form{position: absolute;left: 0px;top: 0px;width: 100%;height: 100%;opacity: 0;cursor: pointer;}
+.edui-dialog-image .edui-image-form .edui-image-file{width: 100%;height:100%;filter: alpha(opacity=0)}
+
+.edui-dialog-image .edui-image-upload1 .edui-image-icon{display: inline-block;width:44px;height:38px;background-image: url('images/upload1.png')}
+.edui-dialog-image .edui-image-upload1 .edui-image-icon.hover{background-position: -50px 0;}
+.edui-dialog-image .edui-image-upload2 .edui-image-icon{display: inline-block;width:120px;height:120px;background-image: url('images/upload2.png')}
+
+.edui-dialog-image .edui-image-dragTip{position: absolute;display:none;top:50%;left:50%;margin-top:30px;margin-left: -60px;
+    color: #222;font-size:14px;text-shadow: 0px 2px 3px #555;}
+
+.edui-dialog-image .edui-image-content{height:330px;width:100%;position: relative;}
+
+.edui-dialog-image .edui-image-mask{display: none;position: absolute;top:0;left:0;width: 100%; height: 100%;background-color:#fff;
+    text-align: center;line-height:300px;color:#000;font-size:14px;font-weight:bold;opacity: 0.6;filter: alpha(opacity=60);}
+.edui-dialog-image .edui-image-mask.edui-active{display: block;}
+
+/*network*/
+.edui-dialog-image .edui-image-searchBar{margin: 10px;}
+.edui-dialog-image .edui-image-searchBar .edui-image-searchTxt{display: inline-block !important;*display: inline !important;*zoom:1;width:400px; border: 1px solid #c5d2ff; height: 20px; line-height: 18px; font-size: 14px; padding: 3px; margin: 0;outline:0;}
+.edui-dialog-image .edui-image-searchBar .edui-image-searchAdd{display: inline-block !important;*display: inline !important;*zoom:1;
+    width:60px; text-align:center;height: 25px;text-align: center;line-height: 25px;
+    background-color: #ffffff;padding: 0; border: 1px solid #ababab;margin-left: 20px;cursor: pointer;
+}
+.edui-dialog-image .edui-image-searchBar .edui-image-searchAdd.hover{
+    background-color: #d5e1f2;
+    padding: 0;
+    border: 1px solid #a3bde3;
+}
+.edui-dialog-image .edui-image-searchRes{height:280px;overflow:auto;}
+
+
+/*common*/
+.edui-dialog-image .edui-image-item{position:relative;float:left;width:120px;height:120px;border: 1px solid #CCC;cursor: default;margin: 5px 0 0 5px;}
+.edui-dialog-image .edui-image-item .edui-image-pic{position: absolute;left:-9999px;}
+.edui-dialog-image .edui-image-item .edui-image-close{position:absolute;right:0;background: url('images/close.png');width:17px;height:17px;cursor:pointer;z-index:1}
+.edui-dialog-image .edui-image-item.hover .edui-image-close{display: block;}

+ 445 - 0
style/NEWUM/dialogs/image/image.js

@@ -0,0 +1,445 @@
+(function () {
+
+    var utils = UM.utils,
+        browser = UM.browser,
+        Base = {
+        checkURL: function (url) {
+            if(!url)    return false;
+            url = utils.trim(url);
+            if (url.length <= 0) {
+                return false;
+            }
+            if (url.search(/http:\/\/|https:\/\//) !== 0) {
+                url += 'http://';
+            }
+
+            url=url.replace(/\?[\s\S]*$/,"");
+
+            if (!/(.gif|.jpg|.jpeg|.png)$/i.test(url)) {
+                return false;
+            }
+            return url;
+        },
+        getAllPic: function (sel, $w, editor) {
+            var me = this,
+                arr = [],
+                $imgs = $(sel, $w);
+
+            $.each($imgs, function (index, node) {
+                $(node).removeAttr("width").removeAttr("height");
+
+//                if (node.width > editor.options.initialFrameWidth) {
+//                    me.scale(node, editor.options.initialFrameWidth -
+//                        parseInt($(editor.body).css("padding-left"))  -
+//                        parseInt($(editor.body).css("padding-right")));
+//                }
+
+                return arr.push({
+                    _src: node.src,
+                    src: node.src
+                });
+            });
+
+            return arr;
+        },
+        scale: function (img, max, oWidth, oHeight) {
+            var width = 0, height = 0, percent, ow = img.width || oWidth, oh = img.height || oHeight;
+            if (ow > max || oh > max) {
+                if (ow >= oh) {
+                    if (width = ow - max) {
+                        percent = (width / ow).toFixed(2);
+                        img.height = oh - oh * percent;
+                        img.width = max;
+                    }
+                } else {
+                    if (height = oh - max) {
+                        percent = (height / oh).toFixed(2);
+                        img.width = ow - ow * percent;
+                        img.height = max;
+                    }
+                }
+            }
+
+            return this;
+        },
+        close: function ($img) {
+
+            $img.css({
+                top: ($img.parent().height() - $img.height()) / 2,
+                left: ($img.parent().width()-$img.width())/2
+            }).prev().on("click",function () {
+
+                if ( $(this).parent().remove().hasClass("edui-image-upload-item") ) {
+                    //显示图片计数-1
+                    Upload.showCount--;
+                    Upload.updateView();
+                }
+
+            });
+
+            return this;
+        },
+        createImgBase64: function (img, file, $w) {
+            if (browser.webkit) {
+                //Chrome8+
+                img.src = window.webkitURL.createObjectURL(file);
+            } else if (browser.gecko) {
+                //FF4+
+                img.src = window.URL.createObjectURL(file);
+            } else {
+                //实例化file reader对象
+                var reader = new FileReader();
+                reader.onload = function (e) {
+                    img.src = this.result;
+                    $w.append(img);
+                };
+                reader.readAsDataURL(file);
+            }
+        },
+        callback: function (editor, $w, url, state) {
+
+            if (state == "SUCCESS") {
+                //显示图片计数+1
+                Upload.showCount++;
+                var $img = $("<img src='" + editor.options.imagePath + url + "' class='edui-image-pic' />"),
+                    $item = $("<div class='edui-image-item edui-image-upload-item'><div class='edui-image-close'></div></div>").append($img);
+
+                if ($(".edui-image-upload2", $w).length < 1) {
+                    $(".edui-image-content", $w).append($item);
+
+                    Upload.render(".edui-image-content", 2)
+                        .config(".edui-image-upload2");
+                } else {
+                    $(".edui-image-upload2", $w).before($item).show();
+                }
+
+                $img.on("load", function () {
+                    Base.scale(this, 120);
+                    Base.close($(this));
+                    $(".edui-image-content", $w).focus();
+                });
+
+            } else {
+                currentDialog.showTip( state );
+                window.setTimeout( function () {
+
+                    currentDialog.hideTip();
+
+                }, 3000 );
+            }
+
+            Upload.toggleMask();
+
+        }
+    };
+
+    /*
+     * 本地上传
+     * */
+    var Upload = {
+        showCount: 0,
+        uploadTpl: '<div class="edui-image-upload%%">' +
+            '<span class="edui-image-icon"></span>' +
+            '<form class="edui-image-form" method="post" enctype="multipart/form-data" target="up">' +
+            '<input style=\"filter: alpha(opacity=0);\" class="edui-image-file" type="file" hidefocus name="upfile" accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"/>' +
+            '</form>' +
+
+            '</div>',
+        init: function (editor, $w) {
+            var me = this;
+
+            me.editor = editor;
+            me.dialog = $w;
+            me.render(".edui-image-local", 1);
+            me.config(".edui-image-upload1");
+            me.submit();
+            me.drag();
+
+            $(".edui-image-upload1").hover(function () {
+                $(".edui-image-icon", this).toggleClass("hover");
+            });
+
+            if (!(UM.browser.ie && UM.browser.version <= 9)) {
+                $(".edui-image-dragTip", me.dialog).css("display", "block");
+            }
+
+
+            return me;
+        },
+        render: function (sel, t) {
+            var me = this;
+
+            $(sel, me.dialog).append($(me.uploadTpl.replace(/%%/g, t)));
+
+            return me;
+        },
+        config: function (sel) {
+            var me = this,
+                url=me.editor.options.imageUrl;
+
+            url=url + (url.indexOf("?") == -1 ? "?" : "&") + "editorid="+me.editor.id;//初始form提交地址;
+
+            $("form", $(sel, me.dialog)).attr("action", url);
+
+            return me;
+        },
+        uploadComplete: function(r){
+            var me = this;
+            try{
+                var json = eval('('+r+')');
+                Base.callback(me.editor, me.dialog, json.url, json.state);
+            }catch (e){
+                var lang = me.editor.getLang('image');
+                Base.callback(me.editor, me.dialog, '', (lang && lang.uploadError) || 'Error!');
+            }
+        },
+        submit: function (callback) {
+
+            var me = this,
+                input = $( '<input style="filter: alpha(opacity=0);" class="edui-image-file" type="file" hidefocus="" name="upfile" accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp">'),
+                input = input[0];
+
+            $(me.dialog).delegate( ".edui-image-file", "change", function ( e ) {
+
+                if ( !this.parentNode ) {
+                    return;
+                }
+
+                $('<iframe name="up"  style="display: none"></iframe>').insertBefore(me.dialog).on('load', function(){
+                    var r = this.contentWindow.document.body.innerHTML;
+                    if(r == '')return;
+                    me.uploadComplete(r);
+                    $(this).unbind('load');
+                    $(this).remove();
+
+                });
+
+                $(this).parent()[0].submit();
+                Upload.updateInput( input );
+                me.toggleMask("Loading....");
+                callback && callback();
+
+            });
+
+            return me;
+        },
+        //更新input
+        updateInput: function ( inputField ) {
+
+            $( ".edui-image-file", this.dialog ).each( function ( index, ele ) {
+
+                ele.parentNode.replaceChild( inputField.cloneNode( true ), ele );
+
+            } );
+
+        },
+        //更新上传框
+        updateView: function () {
+
+            if ( Upload.showCount !== 0 ) {
+                return;
+            }
+
+            $(".edui-image-upload2", this.dialog).hide();
+            $(".edui-image-dragTip", this.dialog).show();
+            $(".edui-image-upload1", this.dialog).show();
+
+        },
+        drag: function () {
+            var me = this;
+            //做拽上传的支持
+            if (!UM.browser.ie9below) {
+                me.dialog.find('.edui-image-content').on('drop',function (e) {
+
+                    //获取文件列表
+                    var fileList = e.originalEvent.dataTransfer.files;
+                    var img = document.createElement('img');
+                    var hasImg = false;
+                    $.each(fileList, function (i, f) {
+                        if (/^image/.test(f.type)) {
+                            //创建图片的base64
+                            Base.createImgBase64(img, f, me.dialog);
+
+                            var xhr = new XMLHttpRequest();
+                            xhr.open("post", me.editor.getOpt('imageUrl') + "?type=ajax", true);
+                            xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
+
+                            //模拟数据
+                            var fd = new FormData();
+                            fd.append(me.editor.getOpt('imageFieldName'), f);
+
+                            xhr.send(fd);
+                            xhr.addEventListener('load', function (e) {
+                                var r = e.target.response, json;
+                                me.uploadComplete(r);
+                                if (i == fileList.length - 1) {
+                                    $(img).remove()
+                                }
+                            });
+                            hasImg = true;
+                        }
+                    });
+                    if (hasImg) {
+                        e.preventDefault();
+                        me.toggleMask("Loading....");
+                    }
+
+                }).on('dragover', function (e) {
+                        e.preventDefault();
+                    });
+            }
+        },
+        toggleMask: function (html) {
+            var me = this;
+
+            var $mask = $(".edui-image-mask", me.dialog);
+            if (html) {
+                if (!(UM.browser.ie && UM.browser.version <= 9)) {
+                    $(".edui-image-dragTip", me.dialog).css( "display", "none" );
+                }
+                $(".edui-image-upload1", me.dialog).css( "display", "none" );
+                $mask.addClass("edui-active").html(html);
+            } else {
+
+                $mask.removeClass("edui-active").html();
+
+                if ( Upload.showCount > 0 ) {
+                    return me;
+                }
+
+                if (!(UM.browser.ie && UM.browser.version <= 9) ){
+                    $(".edui-image-dragTip", me.dialog).css("display", "block");
+                }
+                $(".edui-image-upload1", me.dialog).css( "display", "block" );
+            }
+
+            return me;
+        }
+    };
+
+    /*
+     * 网络图片
+     * */
+    var NetWork = {
+        init: function (editor, $w) {
+            var me = this;
+
+            me.editor = editor;
+            me.dialog = $w;
+
+            me.initEvt();
+        },
+        initEvt: function () {
+            var me = this,
+                url,
+                $ele = $(".edui-image-searchTxt", me.dialog);
+
+            $(".edui-image-searchAdd", me.dialog).on("click", function () {
+                url = Base.checkURL($ele.val());
+
+                if (url) {
+
+                    $("<img src='" + url + "' class='edui-image-pic' />").on("load", function () {
+
+
+
+                        var $item = $("<div class='edui-image-item'><div class='edui-image-close'></div></div>").append(this);
+
+                        $(".edui-image-searchRes", me.dialog).append($item);
+
+                        Base.scale(this, 120);
+
+                        $item.width($(this).width());
+
+                        Base.close($(this));
+
+                        $ele.val("");
+                    });
+                }
+            })
+                .hover(function () {
+                    $(this).toggleClass("hover");
+                });
+        }
+    };
+
+    var $tab = null,
+        currentDialog = null;
+
+    UM.registerWidget('image', {
+        tpl: "<link rel=\"stylesheet\" type=\"text/css\" href=\"<%=image_url%>image.css\">" +
+            "<div class=\"edui-image-wrapper\">" +
+            "<ul class=\"edui-tab-nav\">" +
+            "<li class=\"edui-tab-item edui-active\"><a data-context=\".edui-image-local\" class=\"edui-tab-text\"><%=lang_tab_local%></a></li>" +
+            "<li  class=\"edui-tab-item\"><a data-context=\".edui-image-JimgSearch\" class=\"edui-tab-text\"><%=lang_tab_imgSearch%></a></li>" +
+            "</ul>" +
+            "<div class=\"edui-tab-content\">" +
+            "<div class=\"edui-image-local edui-tab-pane edui-active\">" +
+            "<div class=\"edui-image-content\"></div>" +
+            "<div class=\"edui-image-mask\"></div>" +
+            "<div class=\"edui-image-dragTip\"><%=lang_input_dragTip%></div>" +
+            "</div>" +
+            "<div class=\"edui-image-JimgSearch edui-tab-pane\">" +
+            "<div class=\"edui-image-searchBar\">" +
+            "<table><tr><td><input class=\"edui-image-searchTxt\" type=\"text\"></td>" +
+            "<td><div class=\"edui-image-searchAdd\"><%=lang_btn_add%></div></td></tr></table>" +
+            "</div>" +
+            "<div class=\"edui-image-searchRes\"></div>" +
+            "</div>" +
+            "</div>" +
+            "</div>",
+        initContent: function (editor, $dialog) {
+            var lang = editor.getLang('image')["static"],
+                opt = $.extend({}, lang, {
+                    image_url: UMEDITOR_CONFIG.UMEDITOR_HOME_URL + 'dialogs/image/'
+                });
+
+            Upload.showCount = 0;
+
+            if (lang) {
+                var html = $.parseTmpl(this.tpl, opt);
+            }
+
+            currentDialog = $dialog.edui();
+
+            this.root().html(html);
+
+        },
+        initEvent: function (editor, $w) {
+            $tab = $.eduitab({selector: ".edui-image-wrapper"})
+                .edui().on("beforeshow", function (e) {
+                    e.stopPropagation();
+                });
+
+            Upload.init(editor, $w);
+
+            NetWork.init(editor, $w);
+        },
+        buttons: {
+            'ok': {
+                exec: function (editor, $w) {
+                    var sel = "",
+                        index = $tab.activate();
+
+                    if (index == 0) {
+                        sel = ".edui-image-content .edui-image-pic";
+                    } else if (index == 1) {
+                        sel = ".edui-image-searchRes .edui-image-pic";
+                    }
+
+                    var list = Base.getAllPic(sel, $w, editor);
+
+                    if (index != -1) {
+                        editor.execCommand('insertimage', list);
+                    }
+                }
+            },
+            'cancel': {}
+        },
+        width: 700,
+        height: 408
+    }, function (editor, $w, url, state) {
+        Base.callback(editor, $w, url, state)
+    })
+})();
+

BIN
style/NEWUM/dialogs/image/images/close.png


BIN
style/NEWUM/dialogs/image/images/upload1.png


BIN
style/NEWUM/dialogs/image/images/upload2.png


+ 73 - 0
style/NEWUM/dialogs/link/link.js

@@ -0,0 +1,73 @@
+(function(){
+    var utils = UM.utils;
+    function hrefStartWith(href, arr) {
+        href = href.replace(/^\s+|\s+$/g, '');
+        for (var i = 0, ai; ai = arr[i++];) {
+            if (href.indexOf(ai) == 0) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    UM.registerWidget('link', {
+        tpl: "<style type=\"text/css\">" +
+            ".edui-dialog-link .edui-link-table{font-size: 12px;margin: 10px;line-height: 30px}" +
+            ".edui-dialog-link .edui-link-txt{width:300px;height:21px;line-height:21px;border:1px solid #d7d7d7;}" +
+            "</style>" +
+            "<table class=\"edui-link-table\">" +
+            "<tr>" +
+            "<td><label for=\"href\"><%=lang_input_url%></label></td>" +
+            "<td><input class=\"edui-link-txt\" id=\"edui-link-Jhref\" type=\"text\" /></td>" +
+            "</tr>" +
+            "<tr>" +
+            "<td><label for=\"title\"><%=lang_input_title%></label></td>" +
+            "<td><input class=\"edui-link-txt\" id=\"edui-link-Jtitle\" type=\"text\"/></td>" +
+            "</tr>" +
+            "<tr>" +
+            "<td colspan=\"2\">" +
+            "<label for=\"target\"><%=lang_input_target%></label>" +
+            "<input id=\"edui-link-Jtarget\" type=\"checkbox\"/>" +
+            "</td>" +
+            "</tr>" +
+//            "<tr>" +
+//            "<td colspan=\"2\" id=\"edui-link-Jmsg\"></td>" +
+//            "</tr>" +
+            "</table>",
+        initContent: function (editor) {
+            var lang = editor.getLang('link');
+            if (lang) {
+                var html = $.parseTmpl(this.tpl, lang.static);
+            }
+            this.root().html(html);
+        },
+        initEvent: function (editor, $w) {
+            var link = editor.queryCommandValue('link');
+            if(link){
+                $('#edui-link-Jhref',$w).val(utils.html($(link).attr('href')));
+                $('#edui-link-Jtitle',$w).val($(link).attr('title'));
+                $(link).attr('target') == '_blank' && $('#edui-link-Jtarget').attr('checked',true)
+            }
+            $('#edui-link-Jhref',$w).focus();
+        },
+        buttons: {
+            'ok': {
+                exec: function (editor, $w) {
+                    var href = $('#edui-link-Jhref').val().replace(/^\s+|\s+$/g, '');
+
+                    if (href) {
+                        editor.execCommand('link', {
+                            'href': href,
+                            'target': $("#edui-link-Jtarget:checked").length ? "_blank" : '_self',
+                            'title': $("#edui-link-Jtitle").val().replace(/^\s+|\s+$/g, ''),
+                            '_href': href
+                        });
+                    }
+                }
+            },
+            'cancel':{}
+        },
+        width: 400
+    })
+})();
+

+ 148 - 0
style/NEWUM/dialogs/map/map.html

@@ -0,0 +1,148 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta charset="utf-8"/>
+    <meta name="keywords" content="百度地图,百度地图API,百度地图自定义工具,百度地图所见即所得工具"/>
+    <meta name="description" content="百度地图API自定义地图,帮助用户在可视化操作下生成百度地图"/>
+    <title>百度地图API自定义地图</title>
+    <!--引用百度地图API-->
+    <style type="text/css">
+        html, body {
+            margin: 0;
+            padding: 0;
+            overflow: hidden;
+        }
+    </style>
+    <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=2.0&ak=6b6c1a67eaa7db1ca6d6da28e590e343&services=true"></script>
+</head>
+
+<body onload="initMap();">
+<!--百度地图容器-->
+<div style="width:697px;height:550px;border:#ccc solid 1px;" id="dituContent"></div>
+</body>
+<script type="text/javascript">
+    function getParam(name) {
+        return location.href.match(new RegExp('[?#&]' + name + '=([^?#&]+)', 'i')) ? RegExp.$1 : '';
+    }
+    var map, marker;
+    var centerParam = getParam('center');
+    var zoomParam = getParam('zoom');
+    var widthParam = getParam('width');
+    var heightParam = getParam('height');
+    var markersParam = getParam('markers');
+    var markerStylesParam = getParam('markerStyles');
+    var iframe = getSelfIframe();
+    var UM = parent.UM;
+    var editor = getEditor();
+
+    //创建和初始化地图函数:
+    function initMap() {
+        // [FF]切换模式后报错
+        if (!window.BMap) {
+            return;
+        }
+        var dituContent = document.getElementById('dituContent');
+        dituContent.style.width = widthParam + 'px';
+        dituContent.style.height = heightParam + 'px';
+
+        createMap();//创建地图
+        setMapEvent();//设置地图事件
+        addMapControl();//向地图添加控件
+
+        // 创建标注
+        var markersArr = markersParam.split(',');
+        var point = new BMap.Point(markersArr[0], markersArr[1]);
+        marker = new BMap.Marker(point);
+        marker.enableDragging();
+        map.addOverlay(marker); // 将标注添加到地图中
+
+        if(iframe && UM && editor) { //在编辑状态下
+            setMapListener();//地图改变修改外层的iframe标签src属性
+        } else {
+            document.focus();
+        }
+    }
+
+    //创建地图函数:
+    function createMap() {
+        map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
+        var centerArr = centerParam.split(',');
+        var point = new BMap.Point(parseFloat(centerArr[0]), parseFloat(centerArr[1]));//定义一个中心点坐标
+        map.centerAndZoom(point, parseInt(zoomParam));//设定地图的中心点和坐标并将地图显示在地图容器中
+    }
+
+    //地图事件设置函数:
+    function setMapEvent() {
+        map.enableDragging();//启用地图拖拽事件,默认启用(可不写)
+        map.enableScrollWheelZoom();//启用地图滚轮放大缩小
+        map.enableDoubleClickZoom();//启用鼠标双击放大,默认启用(可不写)
+        map.enableKeyboard();//启用键盘上下左右键移动地图
+    }
+
+    //地图控件添加函数:
+    function addMapControl() {
+        //向地图中添加缩放控件
+        var ctrl_nav = new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE});
+        map.addControl(ctrl_nav);
+        //向地图中添加缩略图控件
+        var ctrl_ove = new BMap.OverviewMapControl({anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 1});
+        map.addControl(ctrl_ove);
+        //向地图中添加比例尺控件
+        var ctrl_sca = new BMap.ScaleControl({anchor: BMAP_ANCHOR_BOTTOM_LEFT});
+        map.addControl(ctrl_sca);
+    }
+
+    function setMapListener() {
+        var timer;
+
+        map.addEventListener('moveend', mapListenerHandler);
+        map.addEventListener('zoomend', mapListenerHandler);
+        marker.addEventListener('dragend', mapListenerHandler);
+
+        function mapListenerHandler() {
+            var zoom = map.getZoom(),
+                center = map.getCenter(),
+                marker = window.marker.P;
+
+            iframe.src = iframe.src.
+                replace(new RegExp('([?#&])center=([^?#&]+)', 'i'), '$1center=' + center.lng + ',' + center.lat).
+                replace(new RegExp('([?#&])markers=([^?#&]+)', 'i'), '$1markers=' + marker.lng + ',' + marker.lat).
+                replace(new RegExp('([?#&])zoom=([^?#&]+)', 'i'), '$1zoom=' + zoom);
+            editor.fireEvent('saveScene');
+            saveScene(editor);
+        }
+
+        function saveScene(){
+            if(!timer) {
+                timer = setTimeout(function(){
+                    editor.fireEvent('savescene');
+                    editor.fireEvent('contentchange');
+                    timer = null;
+                }, 1000);
+            }
+        }
+    }
+
+    function getSelfIframe(){
+        var iframes = parent.document.getElementsByTagName('iframe');
+        for (var key in iframes) {
+            if (iframes[key].contentWindow == window) {
+                return iframes[key];
+            }
+        }
+        return null;
+    }
+
+    function getEditor(){
+        var parentNode = iframe.parentNode;
+        while (parentNode && parentNode.tagName && parentNode.tagName.toLowerCase() != 'body') {
+            if (parentNode.className && parentNode.className.indexOf('edui-body-container')!=-1) {
+                return UM.getEditor(parentNode.id);
+            }
+            parentNode = parentNode.parentNode;
+        }
+        return null;
+    }
+</script>
+</html>

+ 263 - 0
style/NEWUM/dialogs/map/map.js

@@ -0,0 +1,263 @@
+(function () {
+
+    var widgetName = 'map';
+
+    UM.registerWidget(widgetName, {
+
+        tpl: "<style type=\"text/css\">" +
+            ".edui-dialog-map .edui-map-content{width:530px; height: 350px;margin: 10px auto;}" +
+            ".edui-dialog-map .edui-map-content table{width: 100%}" +
+            ".edui-dialog-map .edui-map-content table td{vertical-align: middle;}" +
+            ".edui-dialog-map .edui-map-button { border: 1px solid #ccc; float: left; cursor: default; height: 23px; width: 70px; cursor: pointer; margin: 0; font-size: 12px; line-height: 24px; text-align: center; }" +
+            ".edui-dialog-map .edui-map-button:hover {background:#eee;}" +
+            ".edui-dialog-map .edui-map-city,.edui-dialog-map .edui-map-address{height:21px;background: #FFF;border:1px solid #d7d7d7; line-height: 21px;}" +
+            ".edui-dialog-map .edui-map-city{width:90px}" +
+            ".edui-dialog-map .edui-map-address{width:150px}" +
+            ".edui-dialog-map .edui-map-dynamic-label span{vertical-align:middle;margin: 3px 0px 3px 3px;}" +
+            ".edui-dialog-map .edui-map-dynamic-label input{vertical-align:middle;margin: 3px;}" +
+            "</style>" +
+            "<div class=\"edui-map-content\">" +
+            "<table>" +
+            "<tr>" +
+            "<td><%=lang_city%>:</td>" +
+            "<td><input class=\"edui-map-city\" type=\"text\" value=\"<%=city.value%>\"/></td>" +
+            "<td><%=lang_address%>:</td>" +
+            "<td><input class=\"edui-map-address\" type=\"text\" value=\"\" /></td>" +
+            "<td><a class=\"edui-map-button\"><%=lang_search%></a></td>" +
+            "<td><label class=\"edui-map-dynamic-label\"><input class=\"edui-map-dynamic\" type=\"checkbox\" name=\"edui-map-dynamic\" /><span><%=lang_dynamicmap%></span></label></td>"+
+            "</tr>" +
+            "</table>" +
+            "<div style=\"width:100%;height:340px;margin:5px auto;border:1px solid gray\" class=\"edui-map-container\"></div>" +
+            "</div>" +
+            "<script class=\"edui-tpl-container\" type=\"text/plain\">" +
+            "<!DOCTYPE html>" +
+            "<html>" +
+            "<head>" +
+            "<title></title>" +
+            "</head>" +
+            "<body>" +
+            "<scr_ipt>" +
+            "window.onload = function(){" +
+            "var scripts = document.scripts || document.getElementsByTagName(\"script\")," +
+            "src = [];" +
+            "for( var i = 1, len = scripts.length; i<len; i++ ) {" +
+            "src.push( scripts[i].src );" +
+            "}" +
+            "parent.UM.getEditor(<<id>>).getWidgetData(\'map\').requestMapApi( src );" +
+            "};" +
+            "function mapReadyStateChange ( state ) { " +
+            " if ( state === 'complete' || state === 'loaded' ) {" +
+            " document.close(); " +
+            " } }" +
+            "</scr_ipt>" +
+            "<scr_ipt onreadystatechange='mapReadyStateChange(this.readyState);' onload='mapReadyStateChange(\"loaded\");' src=\"http://api.map.baidu.com/api?v=2.0&ak=6b6c1a67eaa7db1ca6d6da28e590e343&services=true\"></scr_ipt>" +
+            "</body>" +
+            "</html>" +
+            "</script>",
+        initContent: function (editor, $widget) {
+
+            var me = this,
+                lang = editor.getLang(widgetName),
+                theme_url = editor.options.themePath + editor.options.theme;
+
+            if( me.inited ) {
+                me.preventDefault();
+                return false;
+            }
+
+            me.inited = true;
+
+            me.lang = lang;
+            me.editor = editor;
+
+            me.root().html($.parseTmpl(me.tpl, $.extend({}, lang['static'], {
+                'theme_url': theme_url
+            })));
+
+            me.initRequestApi();
+
+        },
+        /**
+         * 初始化请求API
+         */
+        initRequestApi: function () {
+
+            var $ifr = null;
+
+            //已经初始化过, 不用再次初始化
+            if (window.BMap && window.BMap.Map) {
+                this.initBaiduMap();
+            } else {
+
+                $ifr = $('<iframe style="display: none;"></iframe>');
+                $ifr.appendTo( this.root() );
+
+                $ifr = $ifr[ 0 ].contentWindow.document;
+
+                $ifr.open();
+                $ifr.write( this.root().find(".edui-tpl-container").html().replace( /scr_ipt/g, 'script').replace('<<id>>',"'" + this.editor.id + "'") );
+
+            }
+
+        },
+        requestMapApi: function (src) {
+
+            var me = this;
+
+            if (src.length) {
+
+                var _src = src[0];
+
+                src = src.slice(1);
+
+                if (_src) {
+                    $.getScript(_src, function () {
+                        me.requestMapApi(src);
+                    });
+                } else {
+                    me.requestMapApi(src);
+                }
+
+            } else {
+
+                me.initBaiduMap();
+
+            }
+
+
+        },
+        initBaiduMap: function () {
+
+            var $root = this.root(),
+                map = new BMap.Map($root.find(".edui-map-container")[0]),
+                me = this,
+                marker,
+                point,
+                imgcss,
+                img = $(me.editor.selection.getRange().getClosedNode());
+
+            map.enableInertialDragging();
+            map.enableScrollWheelZoom();
+            map.enableContinuousZoom();
+
+            if (img.length && /api[.]map[.]baidu[.]com/ig.test(img.attr("src"))) {
+                var url = img.attr("src"),
+                    centerPos = me.getPars(url, "center").split(","),
+                    markerPos = me.getPars(url, "markers").split(",");
+                point = new BMap.Point(Number(centerPos[0]), Number(centerPos[1]));
+                marker = new BMap.Marker(new BMap.Point(Number(markerPos[0]), Number(markerPos[1])));
+                map.addControl(new BMap.NavigationControl());
+                map.centerAndZoom(point, Number(me.getPars(url, "zoom")));
+                imgcss = img.attr('style');
+            } else {
+                point = new BMap.Point(116.404, 39.915);    // 创建点坐标
+                marker = new BMap.Marker(point);
+                map.addControl(new BMap.NavigationControl());
+                map.centerAndZoom(point, 10);                     // 初始化地图,设置中心点坐标和地图级别。
+            }
+            marker.enableDragging();
+            map.addOverlay(marker);
+
+            me.map = map;
+            me.marker = marker;
+            me.imgcss = imgcss;
+        },
+        doSearch: function () {
+            var me = this,
+                city = me.root().find('.edui-map-city').val(),
+                address = me.root().find('.edui-map-address').val();
+
+            if (!city) {
+                alert(me.lang.cityMsg);
+                return;
+            }
+            var search = new BMap.LocalSearch(city, {
+                onSearchComplete: function (results) {
+                    if (results && results.getNumPois()) {
+                        var points = [];
+                        for (var i = 0; i < results.getCurrentNumPois(); i++) {
+                            points.push(results.getPoi(i).point);
+                        }
+                        if (points.length > 1) {
+                            me.map.setViewport(points);
+                        } else {
+                            me.map.centerAndZoom(points[0], 13);
+                        }
+                        point = me.map.getCenter();
+                        me.marker.setPoint(point);
+                    } else {
+                        alert(me.lang.errorMsg);
+                    }
+                }
+            });
+            search.search(address || city);
+        },
+        getPars: function (str, par) {
+            var reg = new RegExp(par + "=((\\d+|[.,])*)", "g");
+            return reg.exec(str)[1];
+        },
+        reset: function(){
+            this.map && this.map.reset();
+        },
+        initEvent: function () {
+            var me = this,
+                $root = me.root();
+
+            $root.find('.edui-map-address').on('keydown', function (evt) {
+                evt = evt || event;
+                if (evt.keyCode == 13) {
+                    me.doSearch();
+                    return false;
+                }
+            });
+
+            $root.find(".edui-map-button").on('click', function (evt) {
+                me.doSearch();
+            });
+
+            $root.find(".edui-map-address").focus();
+
+            $root.on( "mousewheel DOMMouseScroll", function ( e ) {
+                return false;
+            } );
+
+        },
+        width: 580,
+        height: 408,
+        buttons: {
+            ok: {
+                exec: function (editor) {
+                    var widget = editor.getWidgetData(widgetName),
+                        center = widget.map.getCenter(),
+                        zoom = widget.map.getZoom(),
+                        size = widget.map.getSize(),
+                        point = widget.marker.P;
+
+                    if (widget.root().find(".edui-map-dynamic")[0].checked) {
+                        var URL = editor.getOpt('UMEDITOR_HOME_URL'),
+                            url = [URL + (/\/$/.test(URL) ? '':'/') + "dialogs/map/map.html" +
+                                '#center=' + center.lng + ',' + center.lat,
+                                '&zoom=' + zoom,
+                                '&width=' + size.width,
+                                '&height=' + size.height,
+                                '&markers=' + point.lng + ',' + point.lat].join('');
+                        editor.execCommand('inserthtml', '<iframe class="ueditor_baidumap" src="' + url + '" frameborder="0" width="' + (size.width+4) + '" height="' + (size.height+4) + '"></iframe>');
+                    } else {
+                        url = "http://api.map.baidu.com/staticimage?center=" + center.lng + ',' + center.lat +
+                            "&zoom=" + zoom + "&width=" + size.width + '&height=' + size.height + "&markers=" + point.lng + ',' + point.lat;
+                        editor.execCommand('inserthtml', '<img width="' + size.width + '"height="' + size.height + '" src="' + url + '"' + (widget.imgcss ? ' style="' + widget.imgcss + '"' : '') + '/>', true);
+                    }
+
+                    widget.reset();
+                }
+            },
+            cancel: {
+                exec: function(editor){
+                    editor.getWidgetData(widgetName).reset();
+                }
+            }
+        }
+    });
+
+})();
+

BIN
style/NEWUM/dialogs/video/images/center_focus.jpg


BIN
style/NEWUM/dialogs/video/images/left_focus.jpg


BIN
style/NEWUM/dialogs/video/images/none_focus.jpg


BIN
style/NEWUM/dialogs/video/images/right_focus.jpg


+ 59 - 0
style/NEWUM/dialogs/video/video.css

@@ -0,0 +1,59 @@
+@charset "utf-8";
+.edui-dialog-video .edui-video-wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative}
+.edui-dialog-video .edui-video-tabbody{height:335px;}
+.edui-dialog-video .edui-video-panel { position: absolute;width:100%; height:100%;background: #fff;}
+.edui-dialog-video .edui-video-panel table td{vertical-align: middle;}
+.edui-dialog-video #eduiVideoUrl {
+    width: 470px;
+    height: 21px;
+    line-height: 21px;
+    margin: 8px 5px;
+    background: #FFF;
+    border: 1px solid #d7d7d7;
+}
+.edui-dialog-video #eduiVideoSearchTxt{margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;}
+.edui-dialog-video #searchList{width: 570px;overflow: auto;zoom:1;height: 270px;}
+.edui-dialog-video #searchList div{float: left;width: 120px;height: 135px;margin: 5px 15px;}
+.edui-dialog-video #searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/
+.edui-dialog-video #searchList p{margin-left: 10px;}
+.edui-dialog-video #eduiVideoType{
+    width: 65px;
+    height: 23px;
+    line-height: 22px;
+    border: 1px solid #d7d7d7;
+}
+.edui-dialog-video #eduiVideoSearchBtn,.edui-dialog-video #eduiVideoSearchReset{
+    /*width: 80px;*/
+    height: 25px;
+    line-height: 25px;
+    background: #eee;
+    border: 1px solid #d7d7d7;
+    cursor: pointer;
+    padding: 0 5px;
+}
+
+
+
+.edui-dialog-video #eduiVideoPreview{width: 420px; margin-left: 10px; _margin-left:5px; height: 280px;background-color: #ddd;float: left}
+.edui-dialog-video #eduiVideoInfo {width: 120px;float: left;margin-left: 10px;_margin-left:7px;}
+.edui-dialog-video .edui-video-wrapper fieldset{
+    border: 1px solid #ddd;
+    padding-left: 5px;
+    margin-bottom: 20px;
+    padding-bottom: 5px;
+    width: 115px;
+}
+.edui-dialog-video .edui-video-wrapper fieldset legend{font-weight: bold;}
+.edui-dialog-video .edui-video-wrapper fieldset p{line-height: 30px;}
+.edui-dialog-video .edui-video-wrapper fieldset input.edui-video-txt{
+    width: 65px;
+    height: 21px;
+    line-height: 21px;
+    margin: 8px 5px;
+    background: #FFF;
+    border: 1px solid #d7d7d7;
+}
+.edui-dialog-video .edui-video-wrapper label.edui-video-url{font-weight: bold;margin-left: 5px;color: #06c;}
+.edui-dialog-video #eduiVideoFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;}
+.edui-dialog-video #eduiVideoFloat .edui-video-focus{opacity: 1;filter: alpha(opacity = 100)}
+.edui-dialog-video .edui-video-wrapper span.edui-video-view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue}

+ 282 - 0
style/NEWUM/dialogs/video/video.js

@@ -0,0 +1,282 @@
+
+(function(){
+    var domUtils = UM.dom.domUtils;
+    var widgetName = 'video';
+
+    UM.registerWidget( widgetName,{
+
+        tpl: "<link rel=\"stylesheet\" type=\"text/css\" href=\"<%=video_url%>video.css\" />" +
+            "<div class=\"edui-video-wrapper\">" +
+            "<div id=\"eduiVideoTab\">" +
+            "<div id=\"eduiVideoTabHeads\" class=\"edui-video-tabhead\">" +
+            "<span tabSrc=\"video\" class=\"edui-video-focus\"><%=lang_tab_insertV%></span>" +
+            "</div>" +
+            "<div id=\"eduiVideoTabBodys\" class=\"edui-video-tabbody\">" +
+            "<div id=\"eduiVideoPanel\" class=\"edui-video-panel\">" +
+            "<table><tr><td><label for=\"eduiVideoUrl\" class=\"edui-video-url\"><%=lang_video_url%></label></td><td><input id=\"eduiVideoUrl\" type=\"text\"></td></tr></table>" +
+            "<div id=\"eduiVideoPreview\"></div>" +
+            "<div id=\"eduiVideoInfo\">" +
+            "<fieldset>" +
+            "<legend><%=lang_video_size%></legend>" +
+            "<table>" +
+            "<tr><td><label for=\"eduiVideoWidth\"><%=lang_videoW%></label></td><td><input class=\"edui-video-txt\" id=\"eduiVideoWidth\" type=\"text\"/></td></tr>" +
+            "<tr><td><label for=\"eduiVideoHeight\"><%=lang_videoH%></label></td><td><input class=\"edui-video-txt\" id=\"eduiVideoHeight\" type=\"text\"/></td></tr>" +
+            "</table>" +
+            "</fieldset>" +
+            "<fieldset>" +
+            "<legend><%=lang_alignment%></legend>" +
+            "<div id=\"eduiVideoFloat\"></div>" +
+            "</fieldset>" +
+            "</div>" +
+            "</div>" +
+            "</div>" +
+            "</div>" +
+            "</div>",
+        initContent:function( editor, $widget ){
+
+            var me = this,
+                lang = editor.getLang( widgetName),
+                video_url = UMEDITOR_CONFIG.UMEDITOR_HOME_URL + 'dialogs/video/';
+
+            me.lang = lang;
+            me.editor = editor;
+            me.$widget = $widget;
+            me.root().html( $.parseTmpl( me.tpl, $.extend( { video_url: video_url }, lang['static'] ) ) );
+
+            me.initController( lang );
+
+        },
+        initEvent:function(){
+
+            var me = this,
+                url = $("#eduiVideoUrl", me.$widget)[0];
+
+            if( 'oninput' in url ) {
+                url.oninput = function(){
+                    me.createPreviewVideo( this.value );
+                };
+            } else {
+                url.onpropertychange = function () {
+                    me.createPreviewVideo( this.value );
+                }
+            }
+
+        },
+        initController: function( lang ){
+
+            var me = this,
+                img = me.editor.selection.getRange().getClosedNode(),
+                url;
+
+            me.createAlignButton( ["eduiVideoFloat"] );
+
+            //编辑视频时初始化相关信息
+            if(img && img.className == "edui-faked-video"){
+                $("#eduiVideoUrl", me.$widget)[0].value = url = img.getAttribute("_url");
+                $("#eduiVideoWidth", me.$widget)[0].value = img.width;
+                $("#eduiVideoHeight", me.$widget)[0].value = img.height;
+                var align = domUtils.getComputedStyle(img,"float"),
+                    parentAlign = domUtils.getComputedStyle(img.parentNode,"text-align");
+                me.updateAlignButton(parentAlign==="center"?"center":align);
+            }
+            me.createPreviewVideo(url);
+
+        },
+        /**
+         * 根据url生成视频预览
+         */
+        createPreviewVideo: function(url){
+
+            if ( !url )return;
+
+            var me = this,
+                lang = me.lang,
+                conUrl = me.convert_url(url);
+
+            if(!me.endWith(conUrl,[".swf",".flv",".wmv"])){
+                $("#eduiVideoPreview", me.$widget).html( lang.urlError );
+                return;
+            }
+            $("#eduiVideoPreview", me.$widget)[0].innerHTML = '<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"' +
+                ' src="' + url + '"' +
+                ' width="' + 420  + '"' +
+                ' height="' + 280  + '"' +
+                ' wmode="transparent" play="true" loop="false" menu="false" allowscriptaccess="never" allowfullscreen="true" ></embed>';
+
+        },
+        /**
+         * 将单个视频信息插入编辑器中
+         */
+        insertSingle: function(){
+
+            var me = this,
+                width = $("#eduiVideoWidth", me.$widget)[0],
+                height = $("#eduiVideoHeight", me.$widget)[0],
+                url=$('#eduiVideoUrl', me.$widget)[0].value,
+                align = this.findFocus("eduiVideoFloat","name");
+
+            if(!url) return false;
+            if ( !me.checkNum( [width, height] ) ) return false;
+            this.editor.execCommand('insertvideo', {
+                url: me.convert_url(url),
+                width: width.value,
+                height: height.value,
+                align: align
+            });
+
+        },
+        /**
+         * URL转换
+         */
+        convert_url: function(url){
+            if ( !url ) return '';
+            var matches = url.match(/youtu.be\/(\w+)$/) ||
+                    url.match(/youtube\.com\/watch\?v=(\w+)/) ||
+                    url.match(/youtube.com\/v\/(\w+)/),
+                youku = url.match(/youku\.com\/v_show\/id_(\w+)/),
+                youkuPlay = /player\.youku\.com/ig.test(url);
+
+            if(youkuPlay){
+                url = url.replace(/\?f=.*/, "");
+            } else if (matches){
+                url = "https://www.youtube.com/v/" + matches[1] + "?version=3&feature=player_embedded";
+            }else if(youku){
+                url = "http://player.youku.com/player.php/sid/"+youku[1]+"/v.swf"
+            } else {
+                url = url.replace(/http:\/\/www\.tudou\.com\/programs\/view\/([\w\-]+)\/?/i, "http://www.tudou.com/v/$1")
+                    .replace(/http:\/\/www\.youtube\.com\/watch\?v=([\w\-]+)/i, "http://www.youtube.com/v/$1")
+                    .replace(/http:\/\/v\.youku\.com\/v_show\/id_([\w\-=]+)\.html/i, "http://player.youku.com/player.php/sid/$1")
+                    .replace(/http:\/\/www\.56\.com\/u\d+\/v_([\w\-]+)\.html/i, "http://player.56.com/v_$1.swf")
+                    .replace(/http:\/\/www.56.com\/w\d+\/play_album\-aid\-\d+_vid\-([^.]+)\.html/i, "http://player.56.com/v_$1.swf")
+                    .replace(/http:\/\/v\.ku6\.com\/.+\/([^.]+)\.html/i, "http://player.ku6.com/refer/$1/v.swf")
+                    .replace(/\?f=.*/, "");
+            }
+            return url;
+        },
+        /**
+         * 检测传入的所有input框中输入的长宽是否是正数
+         */
+        checkNum: function checkNum( nodes ) {
+
+            var me = this;
+
+            for ( var i = 0, ci; ci = nodes[i++]; ) {
+                var value = ci.value;
+                if ( !me.isNumber( value ) && value) {
+                    alert( me.lang.numError );
+                    ci.value = "";
+                    ci.focus();
+                    return false;
+                }
+            }
+            return true;
+        },
+        /**
+         * 数字判断
+         * @param value
+         */
+        isNumber: function( value ) {
+            return /(0|^[1-9]\d*$)/.test( value );
+        },
+        updateAlignButton: function( align ) {
+            var aligns = $( "#eduiVideoFloat", this.$widget )[0].children;
+
+            for ( var i = 0, ci; ci = aligns[i++]; ) {
+                if ( ci.getAttribute( "name" ) == align ) {
+                    if ( ci.className !="edui-video-focus" ) {
+                        ci.className = "edui-video-focus";
+                    }
+                } else {
+                    if ( ci.className =="edui-video-focus" ) {
+                        ci.className = "";
+                    }
+                }
+            }
+
+        },
+        /**
+         * 创建图片浮动选择按钮
+         * @param ids
+         */
+        createAlignButton: function( ids ) {
+            var lang = this.lang,
+                vidoe_home = UMEDITOR_CONFIG.UMEDITOR_HOME_URL + 'dialogs/video/';
+
+            for ( var i = 0, ci; ci = ids[i++]; ) {
+                var floatContainer = $( "#" + ci, this.$widget ) [0],
+                    nameMaps = {"none":lang['default'], "left":lang.floatLeft, "right":lang.floatRight};
+                for ( var j in nameMaps ) {
+                    var div = document.createElement( "div" );
+                    div.setAttribute( "name", j );
+                    if ( j == "none" ) div.className="edui-video-focus";
+                    div.style.cssText = "background:url("+ vidoe_home +"images/" + j + "_focus.jpg);";
+                    div.setAttribute( "title", nameMaps[j] );
+                    floatContainer.appendChild( div );
+                }
+                this.switchSelect( ci );
+            }
+        },
+        /**
+         * 选择切换
+         */
+        switchSelect: function( selectParentId ) {
+            var selects = $( "#" + selectParentId, this.$widget )[0].children;
+            for ( var i = 0, ci; ci = selects[i++]; ) {
+               $(ci).on("click", function () {
+                    for ( var j = 0, cj; cj = selects[j++]; ) {
+                        cj.className = "";
+                        cj.removeAttribute && cj.removeAttribute( "class" );
+                    }
+                    this.className = "edui-video-focus";
+                } )
+            }
+        },
+        /**
+         * 找到id下具有focus类的节点并返回该节点下的某个属性
+         * @param id
+         * @param returnProperty
+         */
+        findFocus: function( id, returnProperty ) {
+            var tabs = $( "#" + id , this.$widget)[0].children,
+                property;
+            for ( var i = 0, ci; ci = tabs[i++]; ) {
+                if ( ci.className=="edui-video-focus" ) {
+                    property = ci.getAttribute( returnProperty );
+                    break;
+                }
+            }
+            return property;
+        },
+        /**
+         * 末尾字符检测
+         */
+        endWith: function(str,endStrArr){
+            for(var i=0,len = endStrArr.length;i<len;i++){
+                var tmp = endStrArr[i];
+                if(str.length - tmp.length<0) return false;
+
+                if(str.substring(str.length-tmp.length)==tmp){
+                    return true;
+                }
+            }
+            return false;
+        },
+        width:610,
+        height:498,
+        buttons: {
+            ok: {
+                exec: function( editor, $w ){
+                    $("#eduiVideoPreview", $w).html("");
+                    editor.getWidgetData(widgetName).insertSingle();
+                }
+            },
+            cancel: {
+                exec: function(){
+                    //清除视频
+                    $("#eduiVideoPreview").html("");
+                }
+            }
+        }
+    });
+
+})();

+ 277 - 0
style/NEWUM/index.html

@@ -0,0 +1,277 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <title>UMEDITOR 完整demo</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <link href="themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
+    <script type="text/javascript" src="third-party/jquery.min.js"></script>
+    <script type="text/javascript" charset="utf-8" src="umeditor.config.js"></script>
+    <script type="text/javascript" charset="utf-8" src="umeditor.min.js"></script>
+    <script type="text/javascript" src="lang/zh-cn/zh-cn.js"></script>
+    <style type="text/css">
+        h1{
+            font-family: "微软雅黑";
+            font-weight: normal;
+        }
+        .btn {
+            display: inline-block;
+            *display: inline;
+            padding: 4px 12px;
+            margin-bottom: 0;
+            *margin-left: .3em;
+            font-size: 14px;
+            line-height: 20px;
+            color: #333333;
+            text-align: center;
+            text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+            vertical-align: middle;
+            cursor: pointer;
+            background-color: #f5f5f5;
+            *background-color: #e6e6e6;
+            background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+            background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
+            background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
+            background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+            background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
+            background-repeat: repeat-x;
+            border: 1px solid #cccccc;
+            *border: 0;
+            border-color: #e6e6e6 #e6e6e6 #bfbfbf;
+            border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+            border-bottom-color: #b3b3b3;
+            -webkit-border-radius: 4px;
+            -moz-border-radius: 4px;
+            border-radius: 4px;
+            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
+            filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
+            *zoom: 1;
+            -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+            -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+        }
+
+        .btn:hover,
+        .btn:focus,
+        .btn:active,
+        .btn.active,
+        .btn.disabled,
+        .btn[disabled] {
+            color: #333333;
+            background-color: #e6e6e6;
+            *background-color: #d9d9d9;
+        }
+
+        .btn:active,
+        .btn.active {
+            background-color: #cccccc \9;
+        }
+
+        .btn:first-child {
+            *margin-left: 0;
+        }
+
+        .btn:hover,
+        .btn:focus {
+            color: #333333;
+            text-decoration: none;
+            background-position: 0 -15px;
+            -webkit-transition: background-position 0.1s linear;
+            -moz-transition: background-position 0.1s linear;
+            -o-transition: background-position 0.1s linear;
+            transition: background-position 0.1s linear;
+        }
+
+        .btn:focus {
+            outline: thin dotted #333;
+            outline: 5px auto -webkit-focus-ring-color;
+            outline-offset: -2px;
+        }
+
+        .btn.active,
+        .btn:active {
+            background-image: none;
+            outline: 0;
+            -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+            -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+        }
+
+        .btn.disabled,
+        .btn[disabled] {
+            cursor: default;
+            background-image: none;
+            opacity: 0.65;
+            filter: alpha(opacity=65);
+            -webkit-box-shadow: none;
+            -moz-box-shadow: none;
+            box-shadow: none;
+        }
+    </style>
+</head>
+<body>
+<h1>UMEDITOR 完整demo</h1>
+
+<!--style给定宽度可以影响编辑器的最终宽度-->
+<script type="text/plain" id="myEditor" style="width:1000px;height:240px;">
+    <p>这里我可以写一些输入提示</p>
+</script>
+
+
+<div class="clear"></div>
+<div id="btns">
+    <table>
+        <tr>
+            <td>
+                <button class="btn" unselected="on" onclick="getAllHtml()">获得整个html的内容</button>&nbsp;
+                <button class="btn" onclick="getContent()">获得内容</button>&nbsp;
+                <button class="btn" onclick="setContent()">写入内容</button>&nbsp;
+                <button class="btn" onclick="setContent(true)">追加内容</button>&nbsp;
+                <button class="btn" onclick="getContentTxt()">获得纯文本</button>&nbsp;
+                <button class="btn" onclick="getPlainTxt()">获得带格式的纯文本</button>&nbsp;
+                <button class="btn" onclick="hasContent()">判断是否有内容</button>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <button class="btn" onclick="setFocus()">编辑器获得焦点</button>&nbsp;
+                <button class="btn" onmousedown="isFocus();return false;">编辑器是否获得焦点</button>&nbsp;
+                <button class="btn" onclick="doBlur()">编辑器取消焦点</button>&nbsp;
+                <button class="btn" onclick="insertHtml()">插入给定的内容</button>&nbsp;
+                <button class="btn" onclick="getContentTxt()">获得纯文本</button>&nbsp;
+                <button class="btn" id="enable" onclick="setEnabled()">可以编辑</button>&nbsp;
+                <button class="btn" onclick="setDisabled()">不可编辑</button>
+            </td>
+        </tr>
+        <tr>
+            <td>
+                <button class="btn" onclick="UM.getEditor('myEditor').setHide()">隐藏编辑器</button>&nbsp;
+                <button class="btn" onclick="UM.getEditor('myEditor').setShow()">显示编辑器</button>&nbsp;
+                <button class="btn" onclick="UM.getEditor('myEditor').setHeight(300)">设置编辑器的高度为300</button>&nbsp;
+                <button class="btn" onclick="UM.getEditor('myEditor').setWidth(1200)">设置编辑器的宽度为1200</button>
+            </td>
+        </tr>
+
+    </table>
+</div>
+<table>
+    <tr>
+        <td>
+            <button class="btn" onclick="createEditor()"/>创建编辑器</button>
+            <button class="btn" onclick="deleteEditor()"/>删除编辑器</button>
+        </td>
+    </tr>
+</table>
+
+<div>
+    <h3 id="focush2"></h3>
+</div>
+<script type="text/javascript">
+    //实例化编辑器
+    var um = UM.getEditor('myEditor');
+    um.addListener('blur',function(){
+        $('#focush2').html('编辑器失去焦点了')
+    });
+    um.addListener('focus',function(){
+        $('#focush2').html('')
+    });
+    //按钮的操作
+    function insertHtml() {
+        var value = prompt('插入html代码', '');
+        um.execCommand('insertHtml', value)
+    }
+    function isFocus(){
+        alert(um.isFocus())
+    }
+    function doBlur(){
+        um.blur()
+    }
+    function createEditor() {
+        enableBtn();
+        um = UM.getEditor('myEditor');
+    }
+    function getAllHtml() {
+        alert(UM.getEditor('myEditor').getAllHtml())
+    }
+    function getContent() {
+        var arr = [];
+        arr.push("使用editor.getContent()方法可以获得编辑器的内容");
+        arr.push("内容为:");
+        arr.push(UM.getEditor('myEditor').getContent());
+        alert(arr.join("\n"));
+    }
+    function getPlainTxt() {
+        var arr = [];
+        arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
+        arr.push("内容为:");
+        arr.push(UM.getEditor('myEditor').getPlainTxt());
+        alert(arr.join('\n'))
+    }
+    function setContent(isAppendTo) {
+        var arr = [];
+        arr.push("使用editor.setContent('欢迎使用umeditor')方法可以设置编辑器的内容");
+        UM.getEditor('myEditor').setContent('欢迎使用umeditor', isAppendTo);
+        alert(arr.join("\n"));
+    }
+    function setDisabled() {
+        UM.getEditor('myEditor').setDisabled('fullscreen');
+        disableBtn("enable");
+    }
+
+    function setEnabled() {
+        UM.getEditor('myEditor').setEnabled();
+        enableBtn();
+    }
+
+    function getText() {
+        //当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容
+        var range = UM.getEditor('myEditor').selection.getRange();
+        range.select();
+        var txt = UM.getEditor('myEditor').selection.getText();
+        alert(txt)
+    }
+
+    function getContentTxt() {
+        var arr = [];
+        arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
+        arr.push("编辑器的纯文本内容为:");
+        arr.push(UM.getEditor('myEditor').getContentTxt());
+        alert(arr.join("\n"));
+    }
+    function hasContent() {
+        var arr = [];
+        arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
+        arr.push("判断结果为:");
+        arr.push(UM.getEditor('myEditor').hasContents());
+        alert(arr.join("\n"));
+    }
+    function setFocus() {
+        UM.getEditor('myEditor').focus();
+    }
+    function deleteEditor() {
+        disableBtn();
+        UM.getEditor('myEditor').destroy();
+    }
+    function disableBtn(str) {
+        var div = document.getElementById('btns');
+        var btns = domUtils.getElementsByTagName(div, "button");
+        for (var i = 0, btn; btn = btns[i++];) {
+            if (btn.id == str) {
+                domUtils.removeAttributes(btn, ["disabled"]);
+            } else {
+                btn.setAttribute("disabled", "true");
+            }
+        }
+    }
+    function enableBtn() {
+        var div = document.getElementById('btns');
+        var btns = domUtils.getElementsByTagName(div, "button");
+        for (var i = 0, btn; btn = btns[i++];) {
+            domUtils.removeAttributes(btn, ["disabled"]);
+        }
+    }
+</script>
+
+</body>
+</html>

+ 150 - 0
style/NEWUM/lang/en/en.js

@@ -0,0 +1,150 @@
+/**
+ * English language package
+ */
+UM.I18N['en'] = {
+    'labelMap':{
+        'anchor':'Anchor', 'undo':'Undo', 'redo':'Redo', 'bold':'Bold', 'indent':'Indent', 'snapscreen':'SnapScreen',
+        'italic':'Italic', 'underline':'Underline', 'strikethrough':'Strikethrough', 'subscript':'SubScript','fontborder':'text border',
+        'superscript':'SuperScript', 'formatmatch':'Format Match', 'source':'Source', 'blockquote':'BlockQuote',
+        'pasteplain':'PastePlain', 'selectall':'SelectAll', 'print':'Print', 'preview':'Preview',
+        'horizontal':'Horizontal', 'removeformat':'RemoveFormat', 'time':'Time', 'date':'Date',
+        'unlink':'Unlink', 'insertrow':'InsertRow', 'insertcol':'InsertCol', 'mergeright':'MergeRight', 'mergedown':'MergeDown',
+        'deleterow':'DeleteRow', 'deletecol':'DeleteCol', 'splittorows':'SplitToRows','insertcode':'insert code',
+        'splittocols':'SplitToCols', 'splittocells':'SplitToCells','deletecaption':'DeleteCaption','inserttitle':'InsertTitle',
+        'mergecells':'MergeCells', 'deletetable':'DeleteTable', 'cleardoc':'Clear', 'insertparagraphbeforetable':"InsertParagraphBeforeTable",
+        'fontfamily':'FontFamily', 'fontsize':'FontSize', 'paragraph':'Paragraph', 'image':'Image','edittable':'Edit Table', 'edittd':'Edit Td','link':'Link',
+        'emotion':'Emotion', 'spechars':'Spechars', 'searchreplace':'SearchReplace', 'map':'BaiduMap', 'gmap':'GoogleMap',
+        'video':'Video', 'help':'Help', 'justifyleft':'JustifyLeft', 'justifyright':'JustifyRight', 'justifycenter':'JustifyCenter',
+        'justifyjustify':'Justify', 'forecolor':'FontColor', 'backcolor':'BackColor', 'insertorderedlist':'OL',
+        'insertunorderedlist':'UL', 'fullscreen':'FullScreen', 'directionalityltr':'EnterFromLeft', 'directionalityrtl':'EnterFromRight',
+        'rowspacingtop':'RowSpacingTop', 'rowspacingbottom':'RowSpacingBottom', 'highlightcode':'Code', 'pagebreak':'PageBreak', 'insertframe':'Iframe', 'imagenone':'Default',
+        'imageleft':'ImageLeft', 'imageright':'ImageRight', 'attachment':'Attachment', 'imagecenter':'ImageCenter', 'wordimage':'WordImage',
+        'lineheight':'LineHeight','edittip':'EditTip','customstyle':'CustomStyle', 'scrawl':'Scrawl', 'autotypeset':'AutoTypeset',
+        'webapp':'WebAPP', 'touppercase':'UpperCase', 'tolowercase':'LowerCase','template':'Template','background':'Background','inserttable':'InsertTable',
+        'drafts': 'drafts', 'formula':'formula'
+    },
+    'paragraph':{'p':'Paragraph', 'h1':'Title 1', 'h2':'Title 2', 'h3':'Title 3', 'h4':'Title 4', 'h5':'Title 5', 'h6':'Title 6'},
+    'fontfamily':{
+        'songti':'Sim sun',
+        'kaiti':'Sim kai',
+        'heiti':'Sim hei',
+        'lishu':'Sim li',
+        'yahei': 'Microsoft yahei',
+        'andaleMono':'Andale mono',
+        'arial': 'Arial',
+        'arialBlack':'Arial black',
+        'comicSansMs':'Comic sans ms',
+        'impact':'Impact',
+        'timesNewRoman':'Times new roman'
+    },
+    'ok':"OK",
+    'cancel':"Cancel",
+    'closeDialog':"closeDialog",
+    'tableDrag':"You must import the file uiUtils.js before drag! ",
+    'autofloatMsg':"The plugin AutoFloat depends on EditorUI!",
+    'anthorMsg':"Link",
+    'clearColor':'Clear',
+    'standardColor':'Standard color',
+    'themeColor':'Theme color',
+    'property':'Property',
+    'default':'Default',
+    'modify':'Modify',
+    'justifyleft':'Justify Left',
+    'justifyright':'Justify Right',
+    'justifycenter':'Justify Center',
+    'justify':'Default',
+    'clear':'Clear',
+    'anchorMsg':'Anchor',
+    'delete':'Delete',
+    'clickToUpload':"Click to upload",
+    'unset':"Language hasn't been set!",
+    't_row':'row',
+    't_col':'col',
+    'more':'More',
+    'pasteOpt':'Paste Option',
+    'pasteSourceFormat':"Keep Source Formatting",
+    'tagFormat':'Keep tag',
+    'pasteTextFormat':'Keep Text only',
+
+    //===============dialog i18N=======================
+    'image':{
+        'static':{
+            'lang_tab_local':"Local Upload",
+            'lang_tab_imgSearch':"Network Pictures",
+            'lang_input_dragTip':"Support drag upload",
+            'lang_btn_add':"Add"
+        },
+        'uploadError': 'Upload Error'
+    },
+    'emotion':{
+        'static':{
+            'lang_input_choice':'Choice',
+            'lang_input_Tuzki':'Tuzki',
+            'lang_input_lvdouwa':'LvDouWa',
+            'lang_input_BOBO':'BOBO',
+            'lang_input_babyCat':'BabyCat',
+            'lang_input_bubble':'Bubble',
+            'lang_input_youa':'YouA'
+        }
+    },
+    'gmap':{
+        'static':{
+            'lang_input_address':'Address:',
+            'lang_input_search':'Search',
+            'address':{'value':"Beijing"}
+        },
+        'searchError':'Unable to locate the address!'
+    },
+    'link':{
+        'static':{
+            'lang_input_text':'Text:',
+            'lang_input_url':'URL:',
+            'lang_input_title':'Title:',
+            'lang_input_target':'open in new window:'
+        },
+        'validLink':'Supports only effective when a link is selected',
+        'httpPrompt':'The hyperlink you enter should start with "http|https|ftp://"!'
+    },
+    'map':{
+        'static':{
+            'lang_city':"City",
+            'lang_address':"Address",
+            'city':{'value':"Beijing"},
+            'lang_search':"Search",
+            'lang_dynamicmap':"Dynamic map"
+        },
+        'cityMsg':"Please enter the city name!",
+        'errorMsg':"Can't find the place!"
+    },
+    'video':{
+        'static':{
+            'lang_tab_insertV':"Video",
+            'lang_video_url':" URL ",
+            'lang_video_size':"Video Size",
+            'lang_videoW':"Width",
+            'lang_videoH':"Height",
+            'lang_alignment':"Alignment",
+            'videoSearchTxt':{'value':"Enter the search keyword!"},
+            'videoType':{'options':["All", "Hot", "Entertainment", "Funny", "Sports", "Science", "variety"]},
+            'videoSearchBtn':{'value':"Search in Baidu"},
+            'videoSearchReset':{'value':"Clear result"}
+        },
+        'numError':"Please enter the correct Num. e.g 123,400",
+        'floatLeft':"Float left",
+        'floatRight':"Float right",
+        'default':"Default",
+        'block':"Display in block",
+        'urlError':"The video url format may be wrong!",
+        'loading':" &nbsp;The video is loading, please wait…",
+        'clickToSelect':"Click to select",
+        'goToSource':'Visit source video ',
+        'noVideo':" &nbsp; &nbsp;Sorry,can't find the video,please try again!"
+    },
+    'formula':{
+        'static':{
+            'lang_tab_common':'Common',
+            'lang_tab_symbol':'Symbol',
+            'lang_tab_letter':'Letter'
+        }
+    }
+};

BIN
style/NEWUM/lang/en/images/addimage.png


BIN
style/NEWUM/lang/en/images/alldeletebtnhoverskin.png


BIN
style/NEWUM/lang/en/images/alldeletebtnupskin.png


BIN
style/NEWUM/lang/en/images/background.png


BIN
style/NEWUM/lang/en/images/button.png


BIN
style/NEWUM/lang/en/images/copy.png


BIN
style/NEWUM/lang/en/images/deletedisable.png


BIN
style/NEWUM/lang/en/images/deleteenable.png


BIN
style/NEWUM/lang/en/images/imglabel.png


BIN
style/NEWUM/lang/en/images/listbackground.png


BIN
style/NEWUM/lang/en/images/localimage.png


BIN
style/NEWUM/lang/en/images/music.png


BIN
style/NEWUM/lang/en/images/rotateleftdisable.png


BIN
style/NEWUM/lang/en/images/rotateleftenable.png


BIN
style/NEWUM/lang/en/images/rotaterightdisable.png


BIN
style/NEWUM/lang/en/images/rotaterightenable.png


BIN
style/NEWUM/lang/en/images/upload.png


BIN
style/NEWUM/lang/zh-cn/images/copy.png


BIN
style/NEWUM/lang/zh-cn/images/imglabel.png


BIN
style/NEWUM/lang/zh-cn/images/localimage.png


BIN
style/NEWUM/lang/zh-cn/images/music.png


BIN
style/NEWUM/lang/zh-cn/images/upload.png


+ 150 - 0
style/NEWUM/lang/zh-cn/zh-cn.js

@@ -0,0 +1,150 @@
+/**
+ * 中文语言包
+ */
+UM.I18N['zh-cn'] = {
+    'labelMap':{
+        'anchor':'锚点', 'undo':'撤销', 'redo':'重做', 'bold':'加粗', 'indent':'首行缩进', 'snapscreen':'截图',
+        'italic':'斜体', 'underline':'下划线', 'strikethrough':'删除线', 'subscript':'下标','fontborder':'字符边框',
+        'superscript':'上标', 'formatmatch':'格式刷', 'source':'源代码', 'blockquote':'引用',
+        'pasteplain':'纯文本粘贴模式', 'selectall':'全选', 'print':'打印', 'preview':'预览',
+        'horizontal':'分隔线', 'removeformat':'清除格式', 'time':'时间', 'date':'日期',
+        'unlink':'取消链接', 'insertrow':'前插入行', 'insertcol':'前插入列', 'mergeright':'右合并单元格', 'mergedown':'下合并单元格',
+        'deleterow':'删除行', 'deletecol':'删除列', 'splittorows':'拆分成行', 'splittocols':'拆分成列', 'splittocells':'完全拆分单元格',
+        'mergecells':'合并多个单元格', 'deletetable':'删除表格', 'cleardoc':'清空文档','insertparagraphbeforetable':"表格前插入行",'insertcode':'代码语言','fontfamily':'字体', 'fontsize':'字号', 'paragraph':'段落格式', 'image':'图片',
+        'edittable':'表格属性','edittd':'单元格属性', 'link':'超链接','emotion':'表情', 'spechars':'特殊字符', 'searchreplace':'查询替换', 'map':'百度地图', 'gmap':'Google地图',
+        'video':'视频', 'help':'帮助', 'justifyleft':'居左对齐', 'justifyright':'居右对齐', 'justifycenter':'居中对齐',
+        'justifyjustify':'两端对齐', 'forecolor':'字体颜色', 'backcolor':'背景色', 'insertorderedlist':'有序列表',
+        'insertunorderedlist':'无序列表', 'fullscreen':'全屏', 'directionalityltr':'从左向右输入', 'directionalityrtl':'从右向左输入',
+        'rowspacingtop':'段前距', 'rowspacingbottom':'段后距', 'highlightcode':'插入代码', 'pagebreak':'分页', 'insertframe':'插入Iframe', 'imagenone':'默认',
+        'imageleft':'左浮动', 'imageright':'右浮动', 'attachment':'附件', 'imagecenter':'居中', 'wordimage':'图片转存',
+        'lineheight':'行间距','edittip' :'编辑提示','customstyle':'自定义标题', 'autotypeset':'自动排版', 'webapp':'百度应用',
+        'touppercase':'字母大写', 'tolowercase':'字母小写','background':'背景','template':'模板','scrawl':'涂鸦','music':'音乐','inserttable':'插入表格',
+        'drafts': '草稿箱', 'formula':'数学公式'
+
+
+    },
+    'paragraph':{'p':'段落', 'h1':'标题 1', 'h2':'标题 2', 'h3':'标题 3', 'h4':'标题 4', 'h5':'标题 5', 'h6':'标题 6'},
+    'fontfamily':{
+        'songti':'宋体',
+        'kaiti':'楷体',
+        'heiti':'黑体',
+        'lishu':'隶书',
+        'yahei':'微软雅黑',
+        'andaleMono':'andale mono',
+        'arial': 'arial',
+        'arialBlack':'arial black',
+        'comicSansMs':'comic sans ms',
+        'impact':'impact',
+        'timesNewRoman':'times new roman'
+    },
+    'ok':"确认",
+    'cancel':"取消",
+    'closeDialog':"关闭对话框",
+    'tableDrag':"表格拖动必须引入uiUtils.js文件!",
+    'autofloatMsg':"工具栏浮动依赖编辑器UI,您首先需要引入UI文件!",
+    'anthorMsg':"链接",
+    'clearColor':'清空颜色',
+    'standardColor':'标准颜色',
+    'themeColor':'主题颜色',
+    'property':'属性',
+    'default':'默认',
+    'modify':'修改',
+    'justifyleft':'左对齐',
+    'justifyright':'右对齐',
+    'justifycenter':'居中',
+    'justify':'默认',
+    'clear':'清除',
+    'anchorMsg':'锚点',
+    'delete':'删除',
+    'clickToUpload':"点击上传",
+    'unset':'尚未设置语言文件',
+    't_row':'行',
+    't_col':'列',
+    'more':'更多',
+    'pasteOpt':'粘贴选项',
+    'pasteSourceFormat':"保留源格式",
+    'tagFormat':'只保留标签',
+    'pasteTextFormat':'只保留文本',
+
+    //===============dialog i18N=======================
+    'image':{
+        'static':{
+            'lang_tab_local':"本地上传",
+            'lang_tab_imgSearch':"网络图片",
+            'lang_input_dragTip':"支持图片拖拽上传",
+            'lang_btn_add':"添加"
+        },
+        'uploadError': '上传出错'
+    },
+    'emotion':{
+        'static':{
+            'lang_input_choice':'精选',
+            'lang_input_Tuzki':'兔斯基',
+            'lang_input_BOBO':'BOBO',
+            'lang_input_lvdouwa':'绿豆蛙',
+            'lang_input_babyCat':'baby猫',
+            'lang_input_bubble':'泡泡',
+            'lang_input_youa':'有啊'
+        }
+    },
+    'gmap':{
+        'static':{
+            'lang_input_address':'地址',
+            'lang_input_search':'搜索',
+            'address':{'value':"北京"}
+        },
+        'searchError':'无法定位到该地址!'
+    },
+    'link':{
+        'static':{
+            'lang_input_text':'文本内容:',
+            'lang_input_url':'链接地址:',
+            'lang_input_title':'标题:',
+            'lang_input_target':'是否在新窗口打开:'
+        },
+        'validLink':'只支持选中一个链接时生效',
+        'httpPrompt':'您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀'
+    },
+    'map':{
+        'static':{
+            'lang_city':"城市",
+            'lang_address':"地址",
+            'city':{'value':"北京"},
+            'lang_search':"搜索",
+            'lang_dynamicmap':"插入动态地图"
+        },
+        'cityMsg':"请选择城市",
+        'errorMsg':"抱歉,找不到该位置!"
+    },
+    'video':{
+        'static':{
+            'lang_tab_insertV':"插入视频",
+            'lang_video_url':"视频网址",
+            'lang_video_size':"视频尺寸",
+            'lang_videoW':"宽度",
+            'lang_videoH':"高度",
+            'lang_alignment':"对齐方式",
+            'videoSearchTxt':{'value':"请输入搜索关键字!"},
+            'videoType':{'options':["全部", "热门", "娱乐", "搞笑", "体育", "科技", "综艺"]},
+            'videoSearchBtn':{'value':"百度一下"},
+            'videoSearchReset':{'value':"清空结果"}
+        },
+        'numError':"请输入正确的数值,如123,400",
+        'floatLeft':"左浮动",
+        'floatRight':"右浮动",
+        'default':"默认",
+        'block':"独占一行",
+        'urlError':"输入的视频地址有误,请检查后再试!",
+        'loading':" &nbsp;视频加载中,请等待……",
+        'clickToSelect':"点击选中",
+        'goToSource':'访问源视频',
+        'noVideo':" &nbsp; &nbsp;抱歉,找不到对应的视频,请重试!"
+    },
+    'formula':{
+        'static':{
+            'lang_tab_common':'常用公式',
+            'lang_tab_symbol':'符号',
+            'lang_tab_letter':'字母'
+        }
+    }
+};

+ 773 - 0
style/NEWUM/themes/default/css/umeditor.css

@@ -0,0 +1,773 @@
+.edui-container{
+    position: relative;
+    border: 1px solid #d4d4d4;
+    box-shadow: 2px 2px 5px #d3d6da;
+    background-color: #fff;
+}
+.edui-container .edui-toolbar{
+    position: relative;
+    width:auto;
+    border-bottom: 1px solid #e1e1e1;
+    box-shadow: 2px 2px 5px #d3d6da;
+    background-color: #fafafa;
+    z-index: 99999;
+}
+.edui-toolbar .edui-btn-toolbar{
+    position: relative;
+    padding: 5px;
+}
+.edui-container .edui-editor-body{
+    background-color: #fff;
+}
+.edui-editor-body .edui-body-container{
+}
+
+.edui-editor-body .edui-body-container p{margin:5px 0;}
+.edui-editor-body .edui-body-container{
+    border:0;
+    outline:none;
+    cursor:text;
+    padding:0 10px 0;
+    overflow:auto;
+    display:block;
+    word-wrap:break-word;
+    font-size:16px;
+    font-family:sans-serif;
+}
+.edui-editor-body.focus{border:1px solid #5c9dff}
+.edui-editor-body table{margin:10px 0 10px;border-collapse:collapse;display:table;}
+.edui-editor-body td{padding: 5px 10px;border: 1px solid #DDD;}
+.edui-editor-body iframe.mathquill-embedded-latex{
+    border: 0px;
+    padding: 0px;
+    display: inline;
+    margin: 0px;
+    background: none;
+    vertical-align: middle;
+    width: 0px;
+    height: 0px;
+}
+/*普通按钮*/
+.edui-btn-toolbar .edui-btn{
+    position: relative;
+    display: inline-block;
+    vertical-align: top;
+    *display: inline;
+    *zoom:1;
+    width:auto;
+    margin: 0 1px;
+    padding:1px;
+    border:none;
+    background: none;
+}
+.edui-btn-toolbar .edui-btn .edui-icon{
+    width: 20px;
+    height: 20px;
+    margin: 0;
+    padding:0;
+    background-repeat: no-repeat;
+    background-image: url(../images/icons.png);
+    background-image: url(../images/icons.gif) \9;
+}
+
+/*状态反射*/
+.edui-btn-toolbar .edui-btn.edui-hover,
+.edui-btn-toolbar .edui-btn.edui-active{
+    background-color: #d5e1f2;
+    padding: 0;
+    border: 1px solid #a3bde3;
+    _z-index: 1;
+}
+.edui-btn-toolbar .edui-btn.edui-disabled{
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+}
+.edui-btn-toolbar .edui-btn .edui-icon-source {
+    background-position:-260px -0px;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-undo {
+    background-position: -160px 0;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-redo {
+    background-position: -100px 0;
+}
+.edui-btn-toolbar  .edui-btn .edui-icon-bold{
+    background-position: 0 0;
+}
+.edui-btn-toolbar  .edui-btn .edui-icon-italic {
+    background-position: -60px 0;
+}
+.edui-btn-toolbar  .edui-btn .edui-icon-underline  {
+    background-position: -140px 0
+}
+.edui-btn-toolbar .edui-btn .edui-icon-strikethrough {
+    background-position: -120px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-superscript {
+    background-position: -620px 0;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-subscript {
+    background-position:  -600px 0;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-font, .edui-btn-toolbar .edui-btn .edui-icon-forecolor {
+    background-position: -720px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-backcolor {
+    background-position: -760px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-insertorderedlist {
+    background-position: -80px 0;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-insertunorderedlist {
+    background-position:   -20px 0;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-selectall {
+    background-position: -400px -20px;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-cleardoc {
+    background-position: -520px 0;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-paragraph {
+    background-position: -140px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-fontfamily {
+    background-position: -140px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-fontsize {
+    background-position: -140px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-justifyleft {
+    background-position: -460px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-justifycenter {
+    background-position: -420px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-justifyright {
+    background-position:-480px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-justifyjustify {
+    background-position: -440px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-link {
+    background-position: -500px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-unlink {
+    background-position: -640px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-image {
+    background-position: -380px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-emotion {
+    background-position: -60px -20px;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-video {
+    background-position: -320px -20px;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-map {
+    background-position:  -40px -40px;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-gmap {
+    background-position:  -260px -40px;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-horizontal {
+    background-position: -360px 0;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-print {
+    background-position: -440px -20px;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-preview {
+    background-position: -420px -20px;
+}
+
+.edui-btn-toolbar .edui-btn-fullscreen{
+    float:right;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-fullscreen {
+    background-position: -100px -20px;
+}
+
+.edui-btn-toolbar .edui-btn .edui-icon-removeformat {
+    background-position: -580px 0;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-drafts {
+    background-position: -560px 0;
+}
+.edui-btn-toolbar .edui-btn .edui-icon-formula {
+    background-position: -80px -20px;
+}
+.edui-btn-toolbar .edui-splitbutton{
+    position: relative;
+    display: inline-block ;
+    vertical-align: top;
+    *display: inline ;
+    *zoom:1;
+    margin:0 2px;
+}
+.edui-splitbutton .edui-btn{
+    margin: 0;
+}
+.edui-splitbutton .edui-caret{
+    position: relative;
+    display: inline-block ;
+    vertical-align: top;
+    *display: inline ;
+    *zoom:1;
+    width: 8px;
+    height: 20px;
+    background: url(../images/icons.png) -741px 0;
+    _background: url(../images/icons.gif) -741px 0;
+}
+
+.edui-btn-toolbar .edui-splitbutton,
+.edui-btn-toolbar .edui-splitbutton{
+    _border: none;
+}
+
+/*状态反射*/
+.edui-btn-toolbar .edui-splitbutton.edui-hover .edui-btn{
+    background-color: #d5e1f2;
+}
+
+.edui-btn-toolbar .edui-splitbutton.edui-disabled{
+    opacity: 0.3;
+    filter: alpha(opacity = 30);
+}
+.edui-btn-toolbar .edui-splitbutton.edui-disabled .edui-caret{
+    opacity: 0.3 \0;
+    filter: alpha(opacity = 30)\0;
+}
+
+
+.edui-btn-toolbar .edui-combobox{
+    border: 1px solid #CCC;
+    padding:0;
+    margin:0 2px;
+    line-height: 20px;
+}
+.edui-combobox .edui-button-label{
+    position: relative;
+    display: inline-block;
+    vertical-align: top;
+    *display: inline ;
+    *zoom:1;
+    width:60px;
+    height:20px;
+    line-height: 20px;
+    padding: 2px;
+    margin: 0;
+    font-size: 12px;
+    text-align: center;
+    cursor: default;
+}
+.edui-combobox  .edui-button-spacing{
+    position: relative;
+    display: inline-block ;
+    vertical-align: top;
+    *display: inline ;
+    *zoom:1;
+    height:20px;
+    margin: 0;
+    padding:0 3px;
+}
+.edui-combobox .edui-caret{
+    position: relative;
+    display: inline-block ;
+    vertical-align: top;
+    *display: inline ;
+    *zoom:1;
+    height:20px;
+    width: 12px;
+    margin: 0;
+    padding: 0;
+    background: url(../images/icons.png) -741px 0;
+    _background: url(../images/icons.gif) -741px 0;
+}
+.edui-btn-toolbar .edui-combobox.edui-disabled{
+    opacity: 0.2;
+    filter: alpha(opacity = 20);
+}
+.edui-btn-toolbar .edui-combobox.edui-disabled .edui-button-label,
+.edui-btn-toolbar .edui-combobox.edui-disabled .edui-caret{
+    opacity: 0.2 \0;
+    filter: alpha(opacity = 20)\0;
+}
+.edui-combobox-menu{
+    position: absolute;
+    top: 100%;
+    left: 0;
+    display: none;
+    list-style: none;
+    text-decoration: none;
+    margin: 0;
+    padding:5px;
+    background-color: #ffffff;
+    border: 1px solid #ccc;
+    font-size: 12px;
+    box-shadow: 2px 2px 5px #d3d6da;
+    min-width: 160px;
+    _width: 160px;
+}
+
+.edui-combobox-menu .edui-combobox-item {
+    display: block;
+    border: 1px solid white;
+}
+
+.edui-combobox-menu .edui-combobox-item-label {
+    height: 25px;
+    line-height: 25px;
+    display: inline-block;
+    _display: inline;
+    _zoom: 1;
+    margin-left: 10px;
+}
+
+.edui-combobox-menu .edui-combobox-item:hover, .edui-combobox-menu .edui-combobox-stack-item:hover, .edui-combobox-menu .edui-combobox-item-hover {
+    background-color: #d5e1f2;
+    padding: 0;
+    border: 1px solid #a3bde3;
+}
+
+.edui-combobox-menu .edui-combobox-item .edui-combobox-icon {
+    display: inline-block;
+    *zoom: 1;
+    *display: inline;
+    width: 24px;
+    height: 25px;
+    background: red;
+    vertical-align: bottom;
+    background: url(../images/ok.gif) no-repeat 1000px 1000px;
+}
+
+.edui-combobox-menu .edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 7px;
+}
+
+
+.edui-combobox-menu .edui-combobox-item-separator {
+    min-width: 160px;
+    height: 1px;
+    line-height: 1px;
+    overflow: hidden;
+    background: #d3d3d3;
+    margin: 5px 0;
+    *margin-top: -8px;
+}
+
+/* 字体样式校正 */
+
+.edui-combobox-fontsize .edui-combobox-item-0.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 7px;
+}
+
+.edui-combobox-fontsize .edui-combobox-item-1.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 7px;
+}
+
+.edui-combobox-fontsize .edui-combobox-item-2.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 7px;
+}
+
+.edui-combobox-fontsize .edui-combobox-item-3.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 7px;
+}
+
+/* 24 */
+.edui-combobox-fontsize .edui-combobox-item-4 .edui-combobox-item-label {
+    height: 27px;
+    line-height: 27px;
+}
+
+.edui-combobox-fontsize .edui-combobox-item-4.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 5px;
+}
+
+/* 32 */
+.edui-combobox-fontsize .edui-combobox-item-5 .edui-combobox-item-label {
+    height: 31px;
+    line-height: 31px;
+}
+
+.edui-combobox-fontsize .edui-combobox-item-5.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 4px;
+}
+
+
+/* 48 */
+.edui-combobox-fontsize .edui-combobox-item-6 .edui-combobox-item-label {
+    height: 47px;
+    line-height: 47px;
+}
+
+/*.edui-combobox-fontsize .edui-combobox-item-6 .edui-combobox-icon {*/
+    /*height: 25px;*/
+    /*margin-bottom: 11px;*/
+/*}*/
+
+/*.edui-combobox-fontsize .edui-combobox-item-6.edui-combobox-checked .edui-combobox-icon {*/
+    /*background-position: 10px 7px;*/
+/*}*/
+
+
+/* 段落样式校正 */
+/* h1 */
+.edui-combobox-paragraph .edui-combobox-item-1 .edui-combobox-item-label {
+    font-size: 32px;
+    height: 36px;
+    line-height: 36px;
+}
+
+.edui-combobox-paragraph .edui-combobox-item-1 .edui-combobox-icon {
+    height: 25px;
+    margin-bottom: 5px;
+}
+
+.edui-combobox-paragraph .edui-combobox-item-1.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 7px;
+}
+
+/* h2 */
+.edui-combobox-paragraph .edui-combobox-item-2 .edui-combobox-item-label {
+    font-size: 28px;
+    height: 27px;
+    line-height: 27px;
+}
+
+.edui-combobox-paragraph .edui-combobox-item-2 .edui-combobox-icon {
+    margin-bottom: 5px;
+}
+
+.edui-combobox-paragraph .edui-combobox-item-2.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 10px;
+}
+
+/* h3 */
+.edui-combobox-paragraph .edui-combobox-item-3 .edui-combobox-item-label {
+    font-size: 24px;
+    height: 25px;
+    line-height: 25px;
+}
+
+.edui-combobox-paragraph .edui-combobox-item-3 .edui-combobox-icon {
+    height: 25px;
+    margin-bottom: 5px;
+}
+
+.edui-combobox-paragraph .edui-combobox-item-3.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 11px;
+}
+
+/* h4 */
+.edui-combobox-paragraph .edui-combobox-item-4 .edui-combobox-item-label {
+    font-size: 18px;
+    height: 25px;
+    line-height: 25px;
+}
+
+.edui-combobox-paragraph .edui-combobox-item-4.edui-combobox-checked .edui-combobox-icon {
+    background-position: 10px 6px;
+}
+
+/* h5 */
+.edui-combobox-paragraph .edui-combobox-item-5 .edui-combobox-item-label {
+    font-size: 16px;
+}
+
+/* h6 */
+.edui-combobox-paragraph .edui-combobox-item-6 .edui-combobox-item-label {
+    font-size: 12px;
+}
+.edui-modal {
+    position: fixed;
+    _position: absolute;
+    top: 10%;
+    left: 50%;
+    border: 1px solid #acacac;
+    box-shadow: 2px 2px 5px #d3d6da;
+    background-color: #ffffff;
+    outline: 0;
+}
+.edui-modal-header {
+    padding: 5px 10px;
+    border-bottom: 1px solid #eee;
+}
+.edui-modal-header .edui-close {
+    float: right;
+    width:20px;
+    height:20px;
+    margin-top: 2px;
+    padding: 1px;
+    border: 0;
+    background: url("../images/close.png") no-repeat center center;
+    cursor: pointer;
+}
+.edui-modal-header .edui-close.edui-hover {
+    background-color: #d5e1f2;
+    padding:0;
+    border: 1px solid #a3bde3;
+}
+.edui-modal-header .edui-title {
+    margin: 0;
+    line-height: 25px;
+    font-size: 20px;
+}
+.edui-modal-body {
+    position: relative;
+    max-height: 400px;
+    font-size: 12px;
+    overflow-y: auto;
+}
+.edui-modal-footer {
+    float: right;
+    padding: 5px 15px 15px;
+    overflow: hidden;
+}
+.edui-modal-footer .edui-btn {
+    float: left;
+    height: 24px;
+    width: 96px;
+    margin: 0 10px;
+    background-color: #ffffff;
+    padding: 0;
+    border: 1px solid #ababab;
+    font-size: 12px;
+    line-height: 24px;
+    text-align: center;
+    cursor: pointer;
+}
+.edui-modal-footer .edui-btn.edui-hover{
+    background-color: #d5e1f2;
+    border: 1px solid #a3bde3;
+}
+.edui-modal-backdrop{
+    opacity: 0.5;
+    filter: alpha(opacity=50);
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    background-color: #c6c6c6;
+}
+
+.edui-modal .edui-modal-tip {
+    color: red;
+    position: absolute;
+    bottom: 10px;
+    left: 10px;
+    height: 30px;
+    line-height: 30px;
+    display: none;
+}
+/*图片上传*/
+.edui-dialog-image-body {
+    width: 700px;
+    height: 400px;
+}
+/*插入视频*/
+.edui-dialog-video-body{
+    width: 600px;
+    height: 350px;
+}
+/*谷歌地图*/
+.edui-dialog-gmap-body{
+    width:550px;
+    height: 400px;
+}
+
+/*百度地图*/
+.edui-dialog-map-body{
+    width:580px;
+    height: 400px;
+}
+
+/*链接*/
+.edui-dialog-link-body{
+    width:400px;
+    height:200px;
+}
+.edui-popup{
+    display: none;
+    background: url('../images/pop-bg.png') repeat #fff;
+    padding: 2px;
+}
+.edui-popup .edui-popup-body{
+    border: 1px solid #bfbfbf;
+    background-color: #fff;
+}
+.edui-popup .edui-popup-caret{
+    width: 21px;
+    height: 11px;
+}
+.edui-popup .edui-popup-caret.up{
+    background:url('../images/caret.png') no-repeat 0 0;
+}
+.edui-popup .edui-popup-caret.down{
+    background:url('../images/caret.png') no-repeat 0 0;
+}
+
+
+.edui-tab-nav {
+    margin: 0;
+    padding:0;
+    border-bottom: 1px solid #ddd;
+    list-style: none;
+    height:30px;
+}
+.edui-tab-nav .edui-tab-item {
+    float:left;
+    margin-bottom: -1px;
+    margin-top: 1px;
+    margin-top: 0\9;
+}
+.edui-tab-nav .edui-tab-item .edui-tab-text{
+    display: block;
+    padding:8px 12px;
+    border: 1px solid transparent;
+    color: #0088cc;
+    text-decoration: none;
+    outline: 0;
+    _border:1px solid #fff ;
+    cursor: pointer;
+}
+.edui-tab-nav .edui-tab-item .edui-tab-text:FOCUS {
+    outline: none;
+}
+.edui-tab-nav .edui-tab-item.edui-active  .edui-tab-text{
+    border: 1px solid #ddd;
+    border-bottom-color: transparent;
+    background-color: #fff;
+    padding:8px 12px;
+    color: #555555;
+    cursor: default;
+}
+.edui-tab-content .edui-tab-pane{
+    padding: 1px;
+    position: relative;
+    display: none;
+    background-color: #fff;
+    clear: both;
+}
+.edui-tab-content .edui-tab-pane.edui-active{
+    display: block;
+}
+
+
+.edui-btn-toolbar .edui-tooltip{
+    position: absolute;
+    padding: 5px 0;
+    display: none;
+    /*opacity: 0.8;*/
+    /*filter: alpha(opacity=80);*/
+    z-index: 99999;
+}
+.edui-tooltip .edui-tooltip-arrow{
+    position: absolute;
+    top: 0;
+    _top: -2px;
+    left: 50%;
+    width: 0;
+    height: 0;
+    padding: 0;
+    font-size:0;
+    margin-left: -5px;
+    border-color: transparent;
+    border-style: dashed dashed solid dashed;
+    border-bottom-color: #000000;
+    border-width: 0 5px 5px;
+    background: transparent;
+}
+.edui-tooltip .edui-tooltip-inner{
+    padding: 6px;
+    color: #ffffff;
+    text-align: center;
+    text-decoration: none;
+    font-size: 10px;
+    background-color: #000000;
+    white-space: nowrap;
+    line-height: 12px;
+}
+.edui-splitbutton-color-label {
+    width: 16px;
+    height: 3px;
+    position: absolute;
+    bottom: 2px;
+    left: 50%;
+    margin-left: -8px;
+    overflow: hidden;
+    line-height: 3px;
+}
+.edui-popup .edui-colorpicker {
+    margin: 10px;
+    font-size: 12px;
+}
+.edui-colorpicker .edui-colorpicker-topbar{
+    height: 27px;
+    width: 200px;
+    overflow: hidden;
+}
+.edui-colorpicker .edui-colorpicker-topbar .edui-colorpicker-preview{
+    height: 20px;
+    border: 1px inset black;
+    margin-left: 1px;
+    width: 128px;
+    float: left;
+}
+.edui-colorpicker .edui-colorpicker-topbar .edui-colorpicker-nocolor{
+    float: right;
+    margin-right: 1px;
+    font-size: 12px;
+    line-height: 14px;
+    height: 14px;
+    border: 1px solid #333;
+    padding: 3px 5px;
+    cursor: pointer;
+}
+.edui-colorpicker table{
+    border-collapse: collapse;
+    border-spacing: 2px;
+}
+.edui-colorpicker tr.edui-colorpicker-firstrow{
+    height: 30px;
+}
+.edui-colorpicker table td{
+    padding: 0 2px;
+}
+.edui-colorpicker table td .edui-colorpicker-colorcell{
+    display: block;
+    text-decoration: none;
+    color: black;
+    width: 14px;
+    height: 14px;
+    margin: 0;
+    cursor: pointer;
+}
+.edui-toolbar .edui-separator{
+    width: 2px;
+    height: 20px;
+    padding: 1px 2px;
+    background: url(../images/icons.png) -179px 1px;
+    background: url(../images/icons.gif) -179px 1px \9;
+    display: inline-block ;
+    vertical-align: top;
+    *display: inline ;
+    *zoom:1;
+    border:none;
+
+}

Різницю між файлами не показано, бо вона завелика
+ 8 - 0
style/NEWUM/themes/default/css/umeditor.min.css


BIN
style/NEWUM/themes/default/images/caret.png


BIN
style/NEWUM/themes/default/images/close.png


BIN
style/NEWUM/themes/default/images/icons.gif


BIN
style/NEWUM/themes/default/images/icons.png


BIN
style/NEWUM/themes/default/images/ok.gif


BIN
style/NEWUM/themes/default/images/pop-bg.png


BIN
style/NEWUM/themes/default/images/spacer.gif


BIN
style/NEWUM/themes/default/images/videologo.gif


Різницю між файлами не показано, бо вона завелика
+ 6 - 0
style/NEWUM/third-party/jquery.min.js


BIN
style/NEWUM/third-party/mathquill/font/Symbola.eot


BIN
style/NEWUM/third-party/mathquill/font/Symbola.otf


Різницю між файлами не показано, бо вона завелика
+ 5102 - 0
style/NEWUM/third-party/mathquill/font/Symbola.svg


BIN
style/NEWUM/third-party/mathquill/font/Symbola.ttf


BIN
style/NEWUM/third-party/mathquill/font/Symbola.woff


+ 103 - 0
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/STIXFontLicense2010.txt

@@ -0,0 +1,103 @@
+STIX Font License
+
+24 May 2010
+
+Copyright (c) 2001-2010 by the STI Pub Companies, consisting of the American 
+Institute of Physics, the American Chemical Society, the American Mathematical 
+Society, the American Physical Society, Elsevier, Inc., and The Institute of 
+Electrical and Electronic Engineers, Inc. (www.stixfonts.org), with Reserved 
+Font Name STIX Fonts, STIX Fonts (TM) is a  trademark of The Institute of 
+Electrical and Electronics Engineers, Inc.      
+
+Portions copyright (c) 1998-2003 by MicroPress, Inc. (www.micropress-inc.com), 
+with Reserved Font Name TM Math. To obtain additional mathematical fonts, please 
+contact MicroPress, Inc., 68-30 Harrow Street, Forest Hills, NY 11375, USA, 
+Phone: (718) 575-1816. 
+
+Portions copyright (c) 1990 by Elsevier, Inc. 
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1. 
+This license is copied below, and is also available with a FAQ at: 
+http://scripts.sil.org/OFL 
+
+--------------------------------------------------------------------------- 
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 
+--------------------------------------------------------------------------- 
+
+PREAMBLE 
+
+The goals of the Open Font License (OFL) are to stimulate worldwide development 
+of collaborative font projects, to support the font creation efforts of academic 
+and linguistic communities, and to provide a free and open framework in which 
+fonts may be shared and improved in partnership with others. 
+
+The OFL allows the licensed fonts to be used, studied, modified and redistributed 
+freely as long as they are not sold by themselves. The fonts, including any 
+derivative works, can be bundled, embedded, redistributed and/or sold with any 
+software provided that any reserved names are not used by derivative works. The 
+fonts and derivatives, however, cannot be released under any other type of license. 
+The requirement for fonts to remain under this license does not apply to any 
+document created using the fonts or their derivatives. 
+
+DEFINITIONS 
+
+"Font Software" refers to the set of files released by the Copyright Holder(s) under
+this license and clearly marked as such. This may include source files, build 
+scripts and documentation. 
+
+"Reserved Font Name" refers to any names specified as such after the copyright 
+statement(s). 
+
+"Original Version" refers to the collection of Font Software components as 
+distributed by the Copyright Holder(s). 
+
+"Modified Version" refers to any derivative made by adding to, deleting, or 
+substituting -- in part or in whole -- any of the components of the Original Version, 
+by changing formats or by porting the Font Software to a new environment. 
+
+"Author" refers to any designer, engineer, programmer, technical writer or other 
+person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS 
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of the 
+Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell 
+modified and unmodified copies of the Font Software, subject to the following 
+conditions: 
+
+1) Neither the Font Software nor any of its individual components, in Original or 
+Modified Versions, may be sold by itself. 
+
+2) Original or Modified Versions of the Font Software may be bundled, redistributed 
+and/or sold with any software, provided that each copy contains the above copyright 
+notice and this license. These can be included either as stand-alone text files, 
+human-readable headers or in the appropriate machine-readable metadata fields within 
+text or binary files as long as those fields can be easily viewed by the user. 
+
+3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless 
+explicit written permission is granted by the corresponding Copyright Holder. This 
+restriction only applies to the primary font name as presented to the users. 
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall 
+not be used to promote, endorse or advertise any Modified Version, except to 
+acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with 
+their explicit written permission. 
+
+5) The Font Software, modified or unmodified, in part or in whole, must be distributed 
+entirely under this license, and must not be distributed under any other license. The 
+requirement for fonts to remain under this license does not apply to any document 
+created using the Font Software. 
+
+TERMINATION 
+
+This license becomes null and void if any of the above conditions are not met. 
+
+DISCLAIMER 
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
+INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
+PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER 
+RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, 
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR 
+INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.eot


Різницю між файлами не показано, бо вона завелика
+ 3318 - 0
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.svg


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.ttf


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.woff


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.eot


Різницю між файлами не показано, бо вона завелика
+ 1738 - 0
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.svg


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.ttf


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.woff


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.eot


Різницю між файлами не показано, бо вона завелика
+ 1137 - 0
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.svg


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.ttf


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.woff


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.eot


Різницю між файлами не показано, бо вона завелика
+ 1089 - 0
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.svg


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.ttf


BIN
style/NEWUM/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.woff


+ 357 - 0
style/NEWUM/third-party/mathquill/mathquill.css

@@ -0,0 +1,357 @@
+/*
+ * LaTeX Math in pure HTML and CSS -- No images whatsoever
+ * v0.xa
+ * by Jay and Han
+ * Lesser GPL Licensed: http: //www.gnu.org/licenses/lgpl.html
+ *
+ * This file is automatically included by mathquill.js
+ *
+ */
+@font-face {
+  font-family: Symbola;
+  src: url(font/Symbola.eot);
+  src: local("Symbola Regular"), local("Symbola"), url(font/Symbola.ttf) format("truetype"), url(font/Symbola.otf) format("opentype"), url(font/Symbola.svg#Symbola) format("svg");
+}
+.mathquill-editable {
+  display: -moz-inline-box;
+  display: inline-block;
+  white-space: pre-wrap;
+}
+.mathquill-editable .cursor {
+  border-left: 1px solid black;
+  margin-right: -1px;
+  position: relative;
+  z-index: 1;
+  padding: 0;
+  display: -moz-inline-box;
+  display: inline-block;
+}
+.mathquill-editable .cursor.blink {
+  visibility: hidden;
+}
+.mathquill-editable,
+.mathquill-embedded-latex .mathquill-editable {
+  border: 1px solid gray;
+  padding: 2px;
+}
+.mathquill-embedded-latex .mathquill-editable {
+  margin: 1px;
+}
+.mathquill-editable.hasCursor,
+.mathquill-editable .hasCursor {
+  -webkit-box-shadow: #68b4df 0 0 3px 2px;
+  -moz-box-shadow: #68b4df 0 0 3px 2px;
+  box-shadow: #68b4df 0 0 3px 2px;
+}
+.mathquill-editable .latex-command-input {
+  color: inherit;
+  font-family: "Courier New", monospace;
+  border: 1px solid gray;
+  padding-right: 1px;
+  margin-right: 1px;
+  margin-left: 2px;
+}
+.mathquill-editable .latex-command-input.empty {
+  background: transparent;
+}
+.mathquill-editable .latex-command-input.hasCursor {
+  border-color: ActiveBorder;
+}
+.mathquill-editable.empty:after,
+.mathquill-textbox:after,
+.mathquill-rendered-math .empty:after {
+  visibility: hidden;
+  content: 'c';
+}
+.mathquill-editable .cursor:only-child:after,
+.mathquill-editable .textarea + .cursor:last-child:after {
+  visibility: hidden;
+  content: 'c';
+}
+.mathquill-textbox {
+  overflow-x: auto;
+  overflow-y: hidden;
+}
+.mathquill-rendered-math {
+  font-variant: normal;
+  font-weight: normal;
+  font-style: normal;
+  font-size: 115%;
+  line-height: 1;
+  display: -moz-inline-box;
+  display: inline-block;
+}
+.mathquill-rendered-math .non-leaf,
+.mathquill-rendered-math .scaled {
+  display: -moz-inline-box;
+  display: inline-block;
+}
+.mathquill-rendered-math var,
+.mathquill-rendered-math .text,
+.mathquill-rendered-math .nonSymbola {
+  font-family: "Times New Roman", Symbola, serif;
+  line-height: .9;
+}
+.mathquill-rendered-math * {
+  font-size: inherit;
+  line-height: inherit;
+  margin: 0;
+  padding: 0;
+  border-color: black;
+  -webkit-user-select: none;
+  -moz-user-select: none;
+  user-select: none;
+}
+.mathquill-rendered-math .empty {
+  background: #ccc;
+}
+.mathquill-rendered-math.empty {
+  background: transparent;
+}
+.mathquill-rendered-math .text {
+  font-size: 87%;
+}
+.mathquill-rendered-math .font {
+  font: 1em "Times New Roman", Symbola, serif;
+}
+.mathquill-rendered-math .font * {
+  font-family: inherit;
+  font-style: inherit;
+}
+.mathquill-rendered-math b,
+.mathquill-rendered-math b.font {
+  font-weight: bolder;
+}
+.mathquill-rendered-math var,
+.mathquill-rendered-math i,
+.mathquill-rendered-math i.font {
+  font-syle: italic;
+}
+.mathquill-rendered-math var.florin {
+  margin: 0 -0.1em;
+}
+.mathquill-rendered-math big {
+  font-size: 125%;
+}
+.mathquill-rendered-math .roman {
+  font-style: normal;
+}
+.mathquill-rendered-math .sans-serif {
+  font-family: sans-serif, Symbola, serif;
+}
+.mathquill-rendered-math .monospace {
+  font-family: monospace, Symbola, serif;
+}
+.mathquill-rendered-math .overline {
+  border-top: 1px solid black;
+  margin-top: 1px;
+}
+.mathquill-rendered-math .underline {
+  border-bottom: 1px solid black;
+  margin-bottom: 1px;
+}
+.mathquill-rendered-math .binary-operator {
+  padding: 0 0.2em;
+  display: -moz-inline-box;
+  display: inline-block;
+}
+.mathquill-rendered-math .unary-operator {
+  padding-left: 0.2em;
+}
+.mathquill-rendered-math sup,
+.mathquill-rendered-math sub {
+  position: relative;
+  font-size: 90%;
+}
+.mathquill-rendered-math sup .binary-operator,
+.mathquill-rendered-math sub .binary-operator {
+  padding: 0 .1em;
+}
+.mathquill-rendered-math sup .unary-operator,
+.mathquill-rendered-math sub .unary-operator {
+  padding-left: .1em;
+}
+.mathquill-rendered-math sup.limit,
+.mathquill-rendered-math sub.limit,
+.mathquill-rendered-math sup.nthroot,
+.mathquill-rendered-math sub.nthroot {
+  font-size: 80%;
+}
+.mathquill-rendered-math sup .fraction,
+.mathquill-rendered-math sub .fraction {
+  font-size: 70%;
+  vertical-align: -0.4em;
+}
+.mathquill-rendered-math sup .numerator,
+.mathquill-rendered-math sub .numerator {
+  padding-bottom: 0;
+}
+.mathquill-rendered-math sup .denominator,
+.mathquill-rendered-math sub .denominator {
+  padding-top: 0;
+}
+.mathquill-rendered-math sup {
+  vertical-align: .5em;
+}
+.mathquill-rendered-math sup.limit,
+.mathquill-rendered-math sup.nthroot {
+  vertical-align: 0.8em;
+}
+.mathquill-rendered-math sup.nthroot {
+  margin-right: -0.6em;
+  margin-left: .2em;
+  min-width: .5em;
+}
+.mathquill-rendered-math sub {
+  vertical-align: -0.4em;
+}
+.mathquill-rendered-math sub.limit {
+  vertical-align: -0.6em;
+}
+.mathquill-rendered-math .paren {
+  padding: 0 .1em;
+  vertical-align: bottom;
+  -webkit-transform-origin: bottom center;
+  -moz-transform-origin: bottom center;
+  -ms-transform-origin: bottom center;
+  -o-transform-origin: bottom center;
+  transform-origin: bottom center;
+}
+.mathquill-rendered-math .array {
+  vertical-align: middle;
+  text-align: center;
+}
+.mathquill-rendered-math .array > span {
+  display: block;
+}
+.mathquill-rendered-math .non-italicized-function {
+  font-family: Symbola, "Times New Roman", serif;
+  line-height: .9;
+  font-style: normal;
+  padding-right: .2em;
+}
+.mathquill-rendered-math .fraction {
+  font-size: 90%;
+  text-align: center;
+  vertical-align: -0.5em;
+  padding: 0 .2em;
+}
+.mathquill-rendered-math .fraction,
+.mathquill-rendered-math x:-moz-any-link {
+  display: -moz-groupbox;
+}
+.mathquill-rendered-math .fraction,
+.mathquill-rendered-math x:-moz-any-link,
+.mathquill-rendered-math x:default {
+  display: inline-block;
+}
+.mathquill-rendered-math .numerator,
+.mathquill-rendered-math .denominator {
+  display: block;
+}
+.mathquill-rendered-math .numerator {
+  padding: 0 0.1em;
+  margin-bottom: -0.1em;
+}
+.mathquill-rendered-math .denominator {
+  border-top: 1px solid;
+  float: right;
+  width: 100%;
+  padding: .1em .1em 0 .1em;
+  margin-right: -0.1em;
+  margin-left: -0.1em;
+}
+.mathquill-rendered-math .sqrt-prefix {
+  padding-top: 0;
+  position: relative;
+  top: .1em;
+  vertical-align: top;
+  -webkit-transform-origin: top;
+  -moz-transform-origin: top;
+  -ms-transform-origin: top;
+  -o-transform-origin: top;
+  transform-origin: top;
+}
+.mathquill-rendered-math .sqrt-stem {
+  border-top: 1px solid;
+  margin-top: 1px;
+  padding-left: .15em;
+  padding-right: .2em;
+  margin-right: .1em;
+}
+.mathquill-rendered-math .vector-prefix {
+  display: block;
+  text-align: center;
+  line-height: .25em;
+  margin-bottom: -0.1em;
+  font-size: 0.75em;
+}
+.mathquill-rendered-math .vector-stem {
+  display: block;
+}
+.mathquill-rendered-math,
+.mathquill-rendered-math .mathquill-editable {
+  cursor: text;
+  font-family: Symbola, "Times New Roman", serif;
+}
+.mathquill-rendered-math .selection,
+.mathquill-editable .selection,
+.mathquill-rendered-math .selection .non-leaf,
+.mathquill-editable .selection .non-leaf,
+.mathquill-rendered-math .selection .scaled,
+.mathquill-editable .selection .scaled {
+  background: #B4D5FE !important;
+  background: Highlight !important;
+  color: HighlightText;
+  border-color: HighlightText;
+}
+.mathquill-rendered-math .selection .matrixed,
+.mathquill-editable .selection .matrixed {
+  background: #39F !important;
+}
+.mathquill-rendered-math .selection .matrixed-container,
+.mathquill-editable .selection .matrixed-container {
+  filter: progid:DXImageTransform.Microsoft.Chroma(color='#3399FF') !important;
+}
+.mathquill-rendered-math .selection.blur,
+.mathquill-editable .selection.blur,
+.mathquill-rendered-math .selection.blur .non-leaf,
+.mathquill-editable .selection.blur .non-leaf,
+.mathquill-rendered-math .selection.blur .scaled,
+.mathquill-editable .selection.blur .scaled,
+.mathquill-rendered-math .selection.blur .matrixed,
+.mathquill-editable .selection.blur .matrixed {
+  background: #D4D4D4 !important;
+  color: black;
+  border-color: black;
+}
+.mathquill-rendered-math .selection.blur .matrixed-container,
+.mathquill-editable .selection.blur .matrixed-container {
+  filter: progid:DXImageTransform.Microsoft.Chroma(color='#D4D4D4') !important;
+}
+.mathquill-editable .textarea,
+.mathquill-rendered-math .textarea {
+  position: relative;
+  -webkit-user-select: text;
+  -moz-user-select: text;
+  user-select: text;
+}
+.mathquill-editable .textarea textarea,
+.mathquill-rendered-math .textarea textarea,
+.mathquill-editable .selectable,
+.mathquill-rendered-math .selectable {
+  -webkit-user-select: text;
+  -moz-user-select: text;
+  user-select: text;
+  position: absolute;
+  clip: rect(1em 1em 1em 1em);
+}
+.mathquill-rendered-math .matrixed {
+  background: white;
+  display: -moz-inline-box;
+  display: inline-block;
+}
+.mathquill-rendered-math .matrixed-container {
+  filter: progid:DXImageTransform.Microsoft.Chroma(color='white');
+  margin-top: -0.1em;
+}

Різницю між файлами не показано, бо вона завелика
+ 3888 - 0
style/NEWUM/third-party/mathquill/mathquill.js


Різницю між файлами не показано, бо вона завелика
+ 2 - 0
style/NEWUM/third-party/mathquill/mathquill.min.js


+ 250 - 0
style/NEWUM/umeditor.config.js

@@ -0,0 +1,250 @@
+/**
+ *  umeditor完整配置项
+ *  可以在这里配置整个编辑器的特性
+ */
+/**************************提示********************************
+ * 所有被注释的配置项均为UEditor默认值。
+ * 修改默认配置请首先确保已经完全明确该参数的真实用途。
+ * 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。
+ * 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。
+ **************************提示********************************/
+
+
+(function () {
+    /**
+     * 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
+     * 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
+     * "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/umeditor/"这样的路径。
+     * 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。
+     * 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
+     * window.UMEDITOR_HOME_URL = "/xxxx/xxxx/";
+     */
+    var URL = window.UMEDITOR_HOME_URL || (function(){
+
+        function PathStack() {
+
+            this.documentURL = self.document.URL || self.location.href;
+
+            this.separator = '/';
+            this.separatorPattern = /\\|\//g;
+            this.currentDir = './';
+            this.currentDirPattern = /^[.]\/]/;
+
+            this.path = this.documentURL;
+            this.stack = [];
+
+            this.push( this.documentURL );
+
+        }
+
+        PathStack.isParentPath = function( path ){
+            return path === '..';
+        };
+
+        PathStack.hasProtocol = function( path ){
+            return !!PathStack.getProtocol( path );
+        };
+
+        PathStack.getProtocol = function( path ){
+
+            var protocol = /^[^:]*:\/*/.exec( path );
+
+            return protocol ? protocol[0] : null;
+
+        };
+
+        PathStack.prototype = {
+            push: function( path ){
+
+                this.path = path;
+
+                update.call( this );
+                parse.call( this );
+
+                return this;
+
+            },
+            getPath: function(){
+                return this + "";
+            },
+            toString: function(){
+                return this.protocol + ( this.stack.concat( [''] ) ).join( this.separator );
+            }
+        };
+
+        function update() {
+
+            var protocol = PathStack.getProtocol( this.path || '' );
+
+            if( protocol ) {
+
+                //根协议
+                this.protocol = protocol;
+
+                //local
+                this.localSeparator = /\\|\//.exec( this.path.replace( protocol, '' ) )[0];
+
+                this.stack = [];
+            } else {
+                protocol = /\\|\//.exec( this.path );
+                protocol && (this.localSeparator = protocol[0]);
+            }
+
+        }
+
+        function parse(){
+
+            var parsedStack = this.path.replace( this.currentDirPattern, '' );
+
+            if( PathStack.hasProtocol( this.path ) ) {
+                parsedStack = parsedStack.replace( this.protocol , '');
+            }
+
+            parsedStack = parsedStack.split( this.localSeparator );
+            parsedStack.length = parsedStack.length - 1;
+
+            for(var i= 0,tempPath,l=parsedStack.length,root = this.stack;i<l;i++){
+                tempPath = parsedStack[i];
+                if(tempPath){
+                    if( PathStack.isParentPath( tempPath ) ) {
+                        root.pop();
+                    } else {
+                        root.push( tempPath );
+                    }
+                }
+
+            }
+
+
+        }
+
+        var currentPath = document.getElementsByTagName('script');
+
+        currentPath = currentPath[ currentPath.length -1 ].src;
+
+        return new PathStack().push( currentPath ) + "";
+
+
+    })();
+
+    /**
+     * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
+     */
+    window.UMEDITOR_CONFIG = {
+
+        //为编辑器实例添加一个路径,这个不能被注释
+        UMEDITOR_HOME_URL : URL
+
+        //图片上传配置区
+        ,imageUrl:"/img/textimg"             //图片上传提交地址
+        ,imagePath:""                     //图片修正地址,引用了fixedImagePath,如有特殊需求,可自行配置
+        ,imageFieldName:"upfile"                   //图片数据的key,若此处修改,需要在后台对应文件修改对应参数
+
+
+        //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
+        ,toolbar:['source | bold italic underline strikethrough | forecolor backcolor | removeformat |',
+            'selectall cleardoc |',
+			'paragraph fontfamily fontsize',
+            '| justifyleft justifycenter justifyright justifyjustify |',
+            'image video',"link",
+        "unlink",
+        "anchor",
+        ]
+
+        //语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
+        //lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
+        //,lang:"zh-cn"
+        //,langPath:URL +"lang/"
+
+        //ie下的链接自动监测
+        //,autourldetectinie:false
+
+        //主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
+        //现有如下皮肤:default
+        //,theme:'default'
+        //,themePath:URL +"themes/"
+
+
+
+        //针对getAllHtml方法,会在对应的head标签中增加该编码设置。
+        //,charset:"utf-8"
+
+        //常用配置项目
+        //,isShow : true    //默认显示编辑器
+
+        //,initialContent:'欢迎使用UMEDITOR!'    //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
+
+        //,initialFrameWidth:500 //初始化编辑器宽度,默认500
+        //,initialFrameHeight:500  //初始化编辑器高度,默认500
+
+        //,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
+
+        //,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
+
+        //,focus:false //初始化时,是否让编辑器获得焦点true或false
+
+        //,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
+
+        //,fullscreen : false //是否开启初始化时即全屏,默认关闭
+
+        //,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
+
+        ,zIndex : 1     //编辑器层级的基数,默认是900
+
+        //如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
+        //注意这里添加的样式,最好放在.edui-editor-body .edui-body-container这两个的下边,防止跟页面上css冲突
+        //,initialStyle:'.edui-editor-body .edui-body-container p{line-height:1em}'
+
+        //,autoSyncData:true //自动同步编辑器要提交的数据
+
+        //,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
+
+        //,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
+
+        //fontfamily
+        //字体设置
+//        ,'fontfamily':[
+//              { name: 'songti', val: '宋体,SimSun'},
+//          ]
+
+        //fontsize
+        //字号
+        //,'fontsize':[10, 11, 12, 14, 16, 18, 20, 24, 36]
+
+        //paragraph
+        //段落格式 值留空时支持多语言自动识别,若配置,则以配置值为准
+        //,'paragraph':{'p':'', 'h1':'', 'h2':'', 'h3':'', 'h4':'', 'h5':'', 'h6':''}
+
+        //undo
+        //可以最多回退的次数,默认20
+        //,maxUndoCount:20
+        //当输入的字符数超过该值时,保存一次现场
+        //,maxInputCount:1
+
+        //imageScaleEnabled
+        // 是否允许点击文件拖拽改变大小,默认true
+        //,imageScaleEnabled:true
+
+        //dropFileEnabled
+        // 是否允许拖放图片到编辑区域,上传并插入,默认true
+        //,dropFileEnabled:true
+
+        //pasteImageEnabled
+        // 是否允许粘贴QQ截屏,上传并插入,默认true
+        //,pasteImageEnabled:true
+
+        //autoHeightEnabled
+        // 是否自动长高,默认true
+        //,autoHeightEnabled:true
+
+        //autoFloatEnabled
+        //是否保持toolbar的位置不动,默认true
+        //,autoFloatEnabled:true
+
+        //浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
+        //,topOffset:30
+
+        //填写过滤规则
+        //,filterRules: {}
+    };
+})();

Різницю між файлами не показано, бо вона завелика
+ 10923 - 0
style/NEWUM/umeditor.js


Різницю між файлами не показано, бо вона завелика
+ 264 - 0
style/NEWUM/umeditor.min.js


BIN
style/NEWUM/umeditor1_2_2-utf8.zip


Різницю між файлами не показано, бо вона завелика
+ 8 - 0
style/UM/css/umeditor.min.css


BIN
style/UM/img/caret.png


+ 0 - 0
style/UM/img/close.png


Деякі файли не було показано, через те що забагато файлів було змінено