!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.wangEditor=e()}(this,function(){"use strict";function t(t){var e=void 0;return e=document.createElement("div"),e.innerHTML=t,e.children}function e(t){return!!t&&(t instanceof HTMLCollection||t instanceof NodeList)}function n(t){var n=document.querySelectorAll(t);return e(n)?n:[n]}function i(o){if(o){if(o instanceof i)return o;this.selector=o;var r=o.nodeType,a=[];9===r?a=[o]:1===r?a=[o]:e(o)||o instanceof Array?a=o:"string"==typeof o&&(o=o.replace("/\n/mg","").trim(),a=0===o.indexOf("<")?t(o):n(o));var c=a.length;if(!c)return this;var A=void 0;for(A=0;A/gm,">").replace(/"/gm,""")}function s(t){return"function"==typeof t}function l(t){this.editor=t,this.$elem=o('
\n \n
'),this.type="click",this._active=!1}function d(t,e){var n=this,i=t.editor;this.menu=t,this.opt=e;var r=o('
'),a=e.$title,c=void 0;a&&(c=a.html(),c=J(i,c),a.html(c),a.addClass("w-e-dp-title"),r.append(a));var A=e.list||[],s=e.type||"list",l=e.onClick||O,d=o('
    ');r.append(d),A.forEach(function(t){var e=t.$elem,r=e.html();r=J(i,r),e.html(r);var a=t.value,c=o('
  • ');e&&(c.append(e),d.append(c),c.on("click",function(t){l(a),n.hideTimeoutId=setTimeout(function(){n.hide()},0)}))}),r.on("mouseleave",function(t){n.hideTimeoutId=setTimeout(function(){n.hide()},0)}),this.$container=r,this._rendered=!1,this._show=!1}function u(t){var e=this;this.editor=t,this.$elem=o('
    '),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:100,$title:o("

    设置标题

    "),type:"list",list:[{$elem:o("

    H1

    "),value:"

    "},{$elem:o("

    H2

    "),value:"

    "},{$elem:o("

    H3

    "),value:"

    "},{$elem:o("

    H4

    "),value:"

    "},{$elem:o("

    H5
    "),value:"
    "},{$elem:o("

    正文

    "),value:"

    "}],onClick:function(t){e._command(t)}})}function p(t,e){this.menu=t,this.opt=e}function h(t){this.editor=t,this.$elem=o('

    '),this.type="panel",this._active=!1}function f(t){this.editor=t,this.$elem=o('
    \n \n
    '),this.type="click",this._active=!1}function g(t){this.editor=t,this.$elem=o('
    \n \n
    '),this.type="click",this._active=!1}function m(t){this.editor=t,this.$elem=o('
    \n \n
    '),this.type="click",this._active=!1}function w(t){this.editor=t,this.$elem=o('
    \n \n
    '),this.type="click",this._active=!1}function v(t){this.editor=t,this.$elem=o('
    \n \n
    '),this.type="click",this._active=!1}function b(t){var e=this;this.editor=t,this.$elem=o('
    '),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:120,$title:o("

    设置列表

    "),type:"list",list:[{$elem:o(' 有序列表'),value:"insertOrderedList"},{$elem:o(' 无序列表'),value:"insertUnorderedList"}],onClick:function(t){e._command(t)}})}function y(t){var e=this;this.editor=t,this.$elem=o('
    '),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:100,$title:o("

    对齐方式

    "),type:"list",list:[{$elem:o(' 靠左'),value:"justifyLeft"},{$elem:o(' 居中'),value:"justifyCenter"},{$elem:o(' 靠右'),value:"justifyRight"}],onClick:function(t){e._command(t)}})}function x(t){var e=this;this.editor=t,this.$elem=o('
    '),this.type="droplist";var n=t.config,i=n.colors||[];this._active=!1,this.droplist=new d(this,{width:120,$title:o("

    文字颜色

    "),type:"inline-block",list:i.map(function(t){return{$elem:o(''),value:t}}),onClick:function(t){e._command(t)}})}function E(t){var e=this;this.editor=t,this.$elem=o('
    '),this.type="droplist";var n=t.config,i=n.colors||[];this._active=!1,this.droplist=new d(this,{width:120,$title:o("

    背景色

    "),type:"inline-block",list:i.map(function(t){return{$elem:o(''),value:t}}),onClick:function(t){e._command(t)}})}function C(t){this.editor=t,this.$elem=o('
    \n \n
    '),this.type="click",this._active=!1}function B(t){this.editor=t,this.$elem=o('
    \n \n
    '),this.type="panel",this._active=!1}function I(t){this.editor=t,this.$elem=o('
    \n \n
    '),this.type="panel",this._active=!1}function Q(t){this.editor=t,this.$elem=o('
    '),this.type="panel",this._active=!1}function _(t){this.editor=t,this.$elem=o('
    '),this.type="panel",this._active=!1}function D(t){this.editor=t;var e=c("w-e-img");this.$elem=o('
    '),t.imgMenuId=e,this.type="panel",this._active=!1}function k(t){this.editor=t,this.menus={}}function M(t){var e=t.clipboardData||t.originalEvent&&t.originalEvent.clipboardData,n=void 0;return n=null==e?window.clipboardData&&window.clipboardData.getData("text"):e.getData("text/plain"),A(n)}function S(t,e){var n=t.clipboardData||t.originalEvent&&t.originalEvent.clipboardData,i=void 0,o=void 0;if(null==n?i=window.clipboardData&&window.clipboardData.getData("text"):(i=n.getData("text/plain"),o=n.getData("text/html")),!o&&i&&(o="

    "+A(i)+"

    "),o){var r=o.split("");return 2===r.length&&(o=r[0]),o=o.replace(/<(meta|script|link).+?>/gim,""),o=o.replace(//gm,""),o=o.replace(/\s?data-.+?=('|").+?('|")/gim,""),o=e?o.replace(/\s?(class|style)=('|").+?('|")/gim,""):o.replace(/\s?class=('|").+?('|")/gim,"")}}function U(t){var e=[];if(M(t))return e;var n=t.clipboardData||t.originalEvent&&t.originalEvent.clipboardData||{},i=n.items;return i?(r(i,function(t,n){var i=n.type;/image/i.test(i)&&e.push(n.getAsFile())}),e):e}function N(t){var e=[];return(t.childNodes()||[]).forEach(function(t){var n=void 0,i=t.nodeType;if(3===i&&(n=t.textContent),1===i){n={},n.tag=t.nodeName.toLowerCase();for(var r=[],a=t.attributes||{},c=a.length||0,A=0;A')}function H(t){this.editor=t}function Y(t,e){if(null==t)throw new Error("错误:初始化编辑器时候未传入任何参数,请查阅文档");this.id="wangEditor-"+K++,this.toolbarSelector=t,this.textSelector=e,this.customConfig={}}var L=[];i.prototype={constructor:i,forEach:function(t){var e=void 0;for(e=0;e=e&&(t%=e),o(this[t])},first:function(){return this.get(0)},last:function(){var t=this.length;return this.get(t-1)},on:function(t,e,n){n||(n=e,e=null);var i=[];return i=t.split(/\s+/),this.forEach(function(t){i.forEach(function(i){if(i){if(L.push({elem:t,type:i,fn:n}),!e)return void t.addEventListener(i,n);t.addEventListener(i,function(t){var i=t.target;i.matches(e)&&n.call(i,t)})}})})},off:function(t,e){return this.forEach(function(n){n.removeEventListener(t,e)})},attr:function(t,e){return null==e?this[0].getAttribute(t):this.forEach(function(n){n.setAttribute(t,e)})},addClass:function(t){return t?this.forEach(function(e){var n=void 0;e.className?(n=e.className.split(/\s/),n=n.filter(function(t){return!!t.trim()}),n.indexOf(t)<0&&n.push(t),e.className=n.join(" ")):e.className=t}):this},removeClass:function(t){return t?this.forEach(function(e){var n=void 0;e.className&&(n=e.className.split(/\s/),n=n.filter(function(e){return!(!(e=e.trim())||e===t)}),e.className=n.join(" "))}):this},css:function(t,e){var n=t+":"+e+";";return this.forEach(function(e){var i=(e.getAttribute("style")||"").trim(),o=void 0,r=[];i?(o=i.split(";"),o.forEach(function(t){var e=t.split(":").map(function(t){return t.trim()});2===e.length&&r.push(e[0]+":"+e[1])}),r=r.map(function(e){return 0===e.indexOf(t)?n:e}),r.indexOf(n)<0&&r.push(n),e.setAttribute("style",r.join("; "))):e.setAttribute("style",n)})},show:function(){return this.css("display","block")},hide:function(){return this.css("display","none")},children:function(){var t=this[0];return t?o(t.children):null},childNodes:function(){var t=this[0];return t?o(t.childNodes):null},append:function(t){return this.forEach(function(e){t.forEach(function(t){e.appendChild(t)})})},remove:function(){return this.forEach(function(t){if(t.remove)t.remove();else{var e=t.parentElement;e&&e.removeChild(t)}})},isContain:function(t){var e=this[0],n=t[0];return e.contains(n)},getSizeData:function(){return this[0].getBoundingClientRect()},getNodeName:function(){return this[0].nodeName},find:function(t){return o(this[0].querySelectorAll(t))},text:function(t){return t?this.forEach(function(e){e.innerHTML=t}):this[0].innerHTML.replace(/<.*?>/g,function(){return""})},html:function(t){var e=this[0];return null==t?e.innerHTML:(e.innerHTML=t,this)},val:function(){return this[0].value.trim()},focus:function(){return this.forEach(function(t){t.focus()})},parent:function(){return o(this[0].parentElement)},parentUntil:function(t,e){var n=document.querySelectorAll(t),i=n.length;if(!i)return null;var r=e||this[0];if("BODY"===r.nodeName)return null;var a=r.parentElement,c=void 0;for(c=0;c=0)){var n=e.editor,i=o("body"),r=n.$textContainerElem,a=this.opt,c=o('
    '),A=a.width||300;c.css("width",A+"px").css("margin-left",(0-A)/2+"px");var s=o('');c.append(s),s.on("click",function(){t.hide()});var l=o('
      '),d=o('
      ');c.append(l).append(d);var u=a.height;u&&d.css("height",u+"px").css("overflow-y","auto");var p=a.tabs||[],h=[],f=[];p.forEach(function(t,e){if(t){var i=t.title||"",r=t.tpl||"";i=J(n,i),r=J(n,r);var a=o('
    • '+i+"
    • ");l.append(a);var c=o(r);d.append(c),a._index=e,h.push(a),f.push(c),0===e?(a._active=!0,a.addClass("w-e-active")):c.hide(),a.on("click",function(t){a._active||(h.forEach(function(t){t._active=!1,t.removeClass("w-e-active")}),f.forEach(function(t){t.hide()}),a._active=!0,a.addClass("w-e-active"),c.show())})}}),c.on("click",function(t){t.stopPropagation()}),i.on("click",function(e){t.hide()}),r.append(c),p.forEach(function(e,n){if(e){(e.events||[]).forEach(function(e){var i=e.selector,o=e.type,r=e.fn||G;f[n].find(i).on(o,function(e){e.stopPropagation(),r(e)&&t.hide()})})}});var g=c.find("input[type=text],textarea");g.length&&g.get(0).focus(),this.$container=c,this._hideOtherPanels(),$.push(e)}},hide:function(){var t=this.menu,e=this.$container;e&&e.remove(),$=$.filter(function(e){return e!==t})},_hideOtherPanels:function(){$.length&&$.forEach(function(t){var e=t.panel||{};e.hide&&e.hide()})}},h.prototype={constructor:h,onClick:function(t){var e=this.editor,n=void 0;if(this._active){if(!(n=e.selection.getSelectionContainerElem()))return;e.selection.createRangeByElem(n),e.selection.restoreSelection(),this._createPanel(n.text(),n.attr("href"))}else e.selection.isSelectionEmpty()?this._createPanel("",""):this._createPanel(e.selection.getSelectionText(),"")},_createPanel:function(t,e){var n=this,i=c("input-link"),r=c("input-text"),a=c("btn-ok"),A=c("btn-del"),s=this._active?"inline-block":"none",l=new p(this,{width:300,tabs:[{title:"链接",tpl:'
      \n \n \n
      \n \n \n
      \n
      ',events:[{selector:"#"+a,type:"click",fn:function(){var t=o("#"+i),e=o("#"+r),a=t.val(),c=e.val();return n._insertLink(c,a),!0}},{selector:"#"+A,type:"click",fn:function(){return n._delLink(),!0}}]}]});l.show(),this.panel=l},_delLink:function(){if(this._active){var t=this.editor;if(t.selection.getSelectionContainerElem()){var e=t.selection.getSelectionText();t.cmd.do("insertHTML",""+e+"")}}},_insertLink:function(t,e){var n=this.editor,i=n.config,o=i.linkCheck,r=!0;o&&"function"==typeof o&&(r=o(t,e)),!0===r?n.cmd.do("insertHTML",''+t+""):alert(r)},tryChangeActive:function(t){var e=this.editor,n=this.$elem,i=e.selection.getSelectionContainerElem();i&&("A"===i.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active")))}},f.prototype={constructor:f,onClick:function(t){var e=this.editor,n=e.selection.isSelectionEmpty();n&&e.selection.createEmptyRange(),e.cmd.do("italic"),n&&(e.selection.collapseRange(),e.selection.restoreSelection())},tryChangeActive:function(t){var e=this.editor,n=this.$elem;e.cmd.queryCommandState("italic")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},g.prototype={constructor:g,onClick:function(t){this.editor.cmd.do("redo")}},m.prototype={constructor:m,onClick:function(t){var e=this.editor,n=e.selection.isSelectionEmpty();n&&e.selection.createEmptyRange(),e.cmd.do("strikeThrough"),n&&(e.selection.collapseRange(),e.selection.restoreSelection())},tryChangeActive:function(t){var e=this.editor,n=this.$elem;e.cmd.queryCommandState("strikeThrough")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},w.prototype={constructor:w,onClick:function(t){var e=this.editor,n=e.selection.isSelectionEmpty();n&&e.selection.createEmptyRange(),e.cmd.do("underline"),n&&(e.selection.collapseRange(),e.selection.restoreSelection())},tryChangeActive:function(t){var e=this.editor,n=this.$elem;e.cmd.queryCommandState("underline")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},v.prototype={constructor:v,onClick:function(t){this.editor.cmd.do("undo")}},b.prototype={constructor:b,_command:function(t){var e=this.editor,n=e.$textElem;if(e.selection.restoreSelection(),!e.cmd.queryCommandState(t)){e.cmd.do(t);var i=e.selection.getSelectionContainerElem();if("LI"===i.getNodeName()&&(i=i.parent()),!1!==/^ol|ul$/i.test(i.getNodeName())&&!i.equal(n)){var o=i.parent();o.equal(n)||(i.insertAfter(o),o.remove())}}},tryChangeActive:function(t){var e=this.editor,n=this.$elem;e.cmd.queryCommandState("insertUnOrderedList")||e.cmd.queryCommandState("insertOrderedList")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},y.prototype={constructor:y,_command:function(t){this.editor.cmd.do(t)}},x.prototype={constructor:x,_command:function(t){this.editor.cmd.do("foreColor",t)}},E.prototype={constructor:E,_command:function(t){this.editor.cmd.do("backColor",t)}},C.prototype={constructor:C,onClick:function(t){var e=this.editor,n=e.selection.getSelectionContainerElem(),i=n.getNodeName();if(!z.isIE())return void("BLOCKQUOTE"===i?e.cmd.do("formatBlock","

      "):e.cmd.do("formatBlock","

      "));var r=void 0,a=void 0;if("P"===i)return r=n.text(),a=o("
      "+r+"
      "),a.insertAfter(n),void n.remove();"BLOCKQUOTE"===i&&(r=n.text(),a=o("

      "+r+"

      "),a.insertAfter(n),n.remove())},tryChangeActive:function(t){var e=this.editor,n=this.$elem,i=/^BLOCKQUOTE$/i,o=e.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},B.prototype={constructor:B,onClick:function(t){var e=this.editor,n=e.selection.getSelectionStartElem(),i=e.selection.getSelectionEndElem(),r=e.selection.isSelectionEmpty(),a=e.selection.getSelectionText(),c=void 0;return n.equal(i)?r?void(this._active?this._createPanel(n.html()):this._createPanel()):(c=o(""+a+""),e.cmd.do("insertElem",c),e.selection.createRangeByElem(c,!1),void e.selection.restoreSelection()):void e.selection.restoreSelection()},_createPanel:function(t){var e=this;t=t||"";var n=t?"edit":"new",i=c("texxt"),r=c("btn"),a=new p(this,{width:500,tabs:[{title:"插入代码",tpl:'
      \n \n
      \n \n
      \n
      ',events:[{selector:"#"+r,type:"click",fn:function(){var t=o("#"+i),r=t.val()||t.html();return r=A(r),"new"===n?e._insertCode(r):e._updateCode(r),!0}}]}]});a.show(),this.panel=a},_insertCode:function(t){this.editor.cmd.do("insertHTML","
      "+t+"


      ")},_updateCode:function(t){var e=this.editor,n=e.selection.getSelectionContainerElem();n&&(n.html(t),e.selection.restoreSelection())},tryChangeActive:function(t){var e=this.editor,n=this.$elem,i=e.selection.getSelectionContainerElem();if(i){var o=i.parent();"CODE"===i.getNodeName()&&"PRE"===o.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},I.prototype={constructor:I,onClick:function(){this._createPanel()},_createPanel:function(){var t=this,e=this.editor,n=e.config,i=n.emotions||[],r=[];i.forEach(function(e){var n=e.type,i=e.content||[],a="";"emoji"===n&&i.forEach(function(t){t&&(a+=''+t+"")}),"image"===n&&i.forEach(function(t){var e=t.src,n=t.alt;e&&(a+=''+n+'')}),r.push({title:e.title,tpl:'
      '+a+"
      ",events:[{selector:"span.w-e-item",type:"click",fn:function(e){var n=e.target,i=o(n),r=i.getNodeName(),a=void 0;return a="IMG"===r?i.parent().html():""+i.html()+"",t._insert(a),!0}}]})});var a=new p(this,{width:300,height:200,tabs:r});a.show(),this.panel=a},_insert:function(t){this.editor.cmd.do("insertHTML",t)}},Q.prototype={constructor:Q,onClick:function(){this._active?this._createEditPanel():this._createInsertPanel()},_createInsertPanel:function(){var t=this,e=c("btn"),n=c("row"),i=c("col"),r=new p(this,{width:250,tabs:[{title:"插入表格",tpl:'
      \n

      \n 创建\n \n 行\n \n 列的表格\n

      \n
      \n \n
      \n
      ',events:[{selector:"#"+e,type:"click",fn:function(){var e=parseInt(o("#"+n).val()),r=parseInt(o("#"+i).val());return e&&r&&e>0&&r>0&&t._insert(e,r),!0}}]}]});r.show(),this.panel=r},_insert:function(t,e){var n=void 0,i=void 0,o='';for(n=0;n",0===n)for(i=0;i ";else for(i=0;i ";o+=""}o+="


      ";var r=this.editor;r.cmd.do("insertHTML",o),r.cmd.do("enableObjectResizing",!1),r.cmd.do("enableInlineTableEditing",!1)},_createEditPanel:function(){var t=this,e=c("add-row"),n=c("add-col"),i=c("del-row"),o=c("del-col"),r=c("del-table");new p(this,{width:320,tabs:[{title:"编辑表格",tpl:'
      \n
      \n \n \n \n \n
      \n
      \n \n \n
      ',events:[{selector:"#"+e,type:"click",fn:function(){return t._addRow(),!0}},{selector:"#"+n,type:"click",fn:function(){return t._addCol(),!0}},{selector:"#"+i,type:"click",fn:function(){return t._delRow(),!0}},{selector:"#"+o,type:"click",fn:function(){return t._delCol(),!0}},{selector:"#"+r,type:"click",fn:function(){return t._delTable(),!0}}]}]}).show()},_getLocationData:function(){var t={},e=this.editor,n=e.selection.getSelectionContainerElem();if(n){var i=n.getNodeName();if("TD"===i||"TH"===i){var o=n.parent(),r=o.children(),a=r.length;r.forEach(function(e,i){if(e===n[0])return t.td={index:i,elem:e,length:a},!1});var c=o.parent(),A=c.children(),s=A.length;return A.forEach(function(e,n){if(e===o[0])return t.tr={index:n,elem:e,length:s},!1}),t}}},_addRow:function(){var t=this._getLocationData();if(t){var e=t.tr,n=o(e.elem),i=t.td,r=i.length,a=document.createElement("tr"),c="",A=void 0;for(A=0;A ";a.innerHTML=c,o(a).insertAfter(n)}},_addCol:function(){var t=this._getLocationData();if(t){var e=t.tr,n=t.td,i=n.index;o(e.elem).parent().children().forEach(function(t){var e=o(t),n=e.children(),r=n.get(i),a=r.getNodeName().toLowerCase();o(document.createElement(a)).insertAfter(r)})}},_delRow:function(){var t=this._getLocationData();if(t){o(t.tr.elem).remove()}},_delCol:function(){var t=this._getLocationData();if(t){var e=t.tr,n=t.td,i=n.index;o(e.elem).parent().children().forEach(function(t){o(t).children().get(i).remove()})}},_delTable:function(){var t=this.editor,e=t.selection.getSelectionContainerElem();if(e){var n=e.parentUntil("table");n&&n.remove()}},tryChangeActive:function(t){var e=this.editor,n=this.$elem,i=e.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();"TD"===o||"TH"===o?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},_.prototype={constructor:_,onClick:function(){this._createPanel()},_createPanel:function(){var t=this,e=c("text-val"),n=c("btn"),i=new p(this,{width:350,tabs:[{title:"插入视频",tpl:'
      \n \n
      \n \n
      \n
      ',events:[{selector:"#"+n,type:"click",fn:function(){var n=o("#"+e),i=n.val().trim();return i&&t._insert(i),!0}}]}]});i.show(),this.panel=i},_insert:function(t){this.editor.cmd.do("insertHTML",t+"


      ")}},D.prototype={constructor:D,onClick:function(){this.editor.config.qiniu||(this._active?this._createEditPanel():this._createInsertPanel())}, _createEditPanel:function(){var t=this.editor,e=c("width-30"),n=c("width-50"),i=c("width-100"),o=c("del-btn"),r=[{title:"编辑图片",tpl:'
      \n
      \n 最大宽度:\n \n \n \n
      \n
      \n \n \n
      ',events:[{selector:"#"+e,type:"click",fn:function(){var e=t._selectedImg;return e&&e.css("max-width","30%"),!0}},{selector:"#"+n,type:"click",fn:function(){var e=t._selectedImg;return e&&e.css("max-width","50%"),!0}},{selector:"#"+i,type:"click",fn:function(){var e=t._selectedImg;return e&&e.css("max-width","100%"),!0}},{selector:"#"+o,type:"click",fn:function(){var e=t._selectedImg;return e&&e.remove(),!0}}]}],a=new p(this,{width:300,tabs:r});a.show(),this.panel=a},_createInsertPanel:function(){var t=this.editor,e=t.uploadImg,n=t.config,i=c("up-trigger"),r=c("up-file"),a=c("link-url"),A=c("link-btn"),s=[{title:"上传图片",tpl:'
      \n
      \n \n
      \n
      \n \n
      \n
      ',events:[{selector:"#"+i,type:"click",fn:function(){var t=o("#"+r),e=t[0];if(!e)return!0;e.click()}},{selector:"#"+r,type:"change",fn:function(){var t=o("#"+r),n=t[0];if(!n)return!0;var i=n.files;return i.length&&e.uploadImg(i),!0}}]},{title:"网络图片",tpl:'
      \n \n
      \n \n
      \n
      ',events:[{selector:"#"+A,type:"click",fn:function(){var t=o("#"+a),n=t.val().trim();return n&&e.insertLinkImg(n),!0}}]}],l=[];(n.uploadImgShowBase64||n.uploadImgServer||n.customUploadImg)&&window.FileReader&&l.push(s[0]),n.showLinkImg&&l.push(s[1]);var d=new p(this,{width:300,tabs:l});d.show(),this.panel=d},tryChangeActive:function(t){var e=this.editor,n=this.$elem;e._selectedImg?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var W={};W.bold=l,W.head=u,W.link=h,W.italic=f,W.redo=g,W.strikeThrough=m,W.underline=w,W.undo=v,W.list=b,W.justify=y,W.foreColor=x,W.backColor=E,W.quote=C,W.code=B,W.emoticon=I,W.table=Q,W.video=_,W.image=D,k.prototype={constructor:k,init:function(){var t=this,e=this.editor;((e.config||{}).menus||[]).forEach(function(n){var i=W[n];i&&"function"==typeof i&&(t.menus[n]=new i(e))}),this._addToToolbar(),this._bindEvent()},_addToToolbar:function(){var t=this.editor,e=t.$toolbarElem,n=this.menus,i=t.config,o=i.zIndex+1;r(n,function(t,n){var i=n.$elem;i&&(i.css("z-index",o),e.append(i))})},_bindEvent:function(){var t=this.menus,e=this.editor;r(t,function(t,n){var i=n.type;if(i){var o=n.$elem,r=n.droplist;n.panel;"click"===i&&n.onClick&&o.on("click",function(t){null!=e.selection.getRange()&&n.onClick(t)}),"droplist"===i&&r&&o.on("mouseenter",function(t){null!=e.selection.getRange()&&(r.showTimeoutId=setTimeout(function(){r.show()},200))}).on("mouseleave",function(t){r.hideTimeoutId=setTimeout(function(){r.hide()},0)}),"panel"===i&&n.onClick&&o.on("click",function(t){t.stopPropagation(),null!=e.selection.getRange()&&n.onClick(t)})}})},changeActive:function(){r(this.menus,function(t,e){e.tryChangeActive&&setTimeout(function(){e.tryChangeActive()},100)})}},R.prototype={constructor:R,init:function(){this._bindEvent()},clear:function(){this.html("


      ")},html:function(t){var e=this.editor,n=e.$textElem,i=void 0;if(null==t)return i=n.html(),i=i.replace(/\u200b/gm,""),i;n.html(t),e.initSelection()},getJSON:function(){return N(this.editor.$textElem)},text:function(t){var e=this.editor,n=e.$textElem,i=void 0;if(null==t)return i=n.text(),i=i.replace(/\u200b/gm,""),i;n.text("

      "+t+"

      "),e.initSelection()},append:function(t){var e=this.editor;e.$textElem.append(o(t)),e.initSelection()},_bindEvent:function(){this._saveRangeRealTime(),this._enterKeyHandle(),this._clearHandle(),this._pasteHandle(),this._tabHandle(),this._imgHandle(),this._dragHandle()},_saveRangeRealTime:function(){function t(t){e.selection.saveRange(),e.menus.changeActive()}var e=this.editor,n=e.$textElem;n.on("keyup",t),n.on("mousedown",function(e){n.on("mouseleave",t)}),n.on("mouseup",function(e){t(),n.off("mouseleave",t)})},_enterKeyHandle:function(){function t(t){var e=o("


      ");e.insertBefore(t),i.selection.createRangeByElem(e,!0),i.selection.restoreSelection(),t.remove()}function e(e){var n=i.selection.getSelectionContainerElem(),o=n.parent();if("
      "===o.html())return void t(n);if(o.equal(r)){"P"!==n.getNodeName()&&(n.text()||t(n))}}function n(t){var e=i.selection.getSelectionContainerElem();if(e){var n=e.parent(),r=e.getNodeName(),a=n.getNodeName();if("CODE"===r&&"PRE"===a&&i.cmd.queryCommandSupported("insertHTML")){if(!0===i._willBreakCode){var c=o("


      ");return c.insertAfter(n),i.selection.createRangeByElem(c,!0),i.selection.restoreSelection(),i._willBreakCode=!1,void t.preventDefault()}var A=i.selection.getRange().startOffset;i.cmd.do("insertHTML","\n"),i.selection.saveRange(),i.selection.getRange().startOffset===A&&i.cmd.do("insertHTML","\n");var s=e.html().length;i.selection.getRange().startOffset+1===s&&(i._willBreakCode=!0),t.preventDefault()}}}var i=this.editor,r=i.$textElem;r.on("keyup",function(t){13===t.keyCode&&e(t)}),r.on("keydown",function(t){if(13!==t.keyCode)return void(i._willBreakCode=!1);n(t)})},_clearHandle:function(){var t=this.editor,e=t.$textElem;e.on("keydown",function(t){if(8===t.keyCode){return"


      "===e.html().toLowerCase().trim()?void t.preventDefault():void 0}}),e.on("keyup",function(n){if(8===n.keyCode){var i=void 0,r=e.html().toLowerCase().trim();r&&"
      "!==r||(i=o("


      "),e.html(""),e.append(i),t.selection.createRangeByElem(i,!1,!0),t.selection.restoreSelection())}})},_pasteHandle:function(){function t(){var t=Date.now(),e=!1;return t-c>=500&&(e=!0),c=t,e}function e(){c=0}var n=this.editor,i=n.config,o=i.pasteFilterStyle,r=i.pasteTextHandle,a=n.$textElem,c=0;a.on("paste",function(i){if(!z.isIE()&&(i.preventDefault(),t())){var a=S(i,o),c=M(i);c=c.replace(/\n/gm,"
      ");var A=n.selection.getSelectionContainerElem();if(A){var l=A.getNodeName();if("CODE"===l||"PRE"===l)return r&&s(r)&&(c=""+(r(c)||"")),void n.cmd.do("insertHTML","

      "+c+"

      ");if(!a)return void e();try{r&&s(r)&&(a=""+(r(a)||"")),n.cmd.do("insertHTML",a)}catch(t){r&&s(r)&&(c=""+(r(c)||"")),n.cmd.do("insertHTML","

      "+c+"

      ")}}}}),a.on("paste",function(e){if(!z.isIE()&&(e.preventDefault(),t())){var i=U(e);if(i&&i.length){var o=n.selection.getSelectionContainerElem();if(o){var r=o.getNodeName();if("CODE"!==r&&"PRE"!==r){n.uploadImg.uploadImg(i)}}}}})},_tabHandle:function(){var t=this.editor;t.$textElem.on("keydown",function(e){if(9===e.keyCode&&t.cmd.queryCommandSupported("insertHTML")){var n=t.selection.getSelectionContainerElem();if(n){var i=n.parent(),o=n.getNodeName(),r=i.getNodeName();"CODE"===o&&"PRE"===r?t.cmd.do("insertHTML"," "):t.cmd.do("insertHTML","    "),e.preventDefault()}}})},_imgHandle:function(){var t=this.editor,e=t.$textElem;e.on("click","img",function(e){var n=this,i=o(n);"1"!==i.attr("data-w-e")&&(t._selectedImg=i,t.selection.createRangeByElem(i),t.selection.restoreSelection())}),e.on("click keyup",function(e){e.target.matches("img")||(t._selectedImg=null)})},_dragHandle:function(){var t=this.editor;o(document).on("dragleave drop dragenter dragover",function(t){t.preventDefault()}),t.$textElem.on("drop",function(e){e.preventDefault();var n=e.dataTransfer&&e.dataTransfer.files;n&&n.length&&t.uploadImg.uploadImg(n)})}},F.prototype={constructor:F,do:function(t,e){var n=this.editor;if(n._useStyleWithCSS||(document.execCommand("styleWithCSS",null,!0),n._useStyleWithCSS=!0),n.selection.getRange()){n.selection.restoreSelection();var i="_"+t;this[i]?this[i](e):this._execCommand(t,e),n.menus.changeActive(),n.selection.saveRange(),n.selection.restoreSelection(),n.change&&n.change()}},_insertHTML:function(t){var e=this.editor,n=e.selection.getRange();this.queryCommandSupported("insertHTML")?this._execCommand("insertHTML",t):n.insertNode?(n.deleteContents(),n.insertNode(o(t)[0])):n.pasteHTML&&n.pasteHTML(t)},_insertElem:function(t){var e=this.editor,n=e.selection.getRange();n.insertNode&&(n.deleteContents(),n.insertNode(t[0]))},_execCommand:function(t,e){document.execCommand(t,!1,e)},queryCommandValue:function(t){return document.queryCommandValue(t)},queryCommandState:function(t){return document.queryCommandState(t)},queryCommandSupported:function(t){return document.queryCommandSupported(t)}},T.prototype={constructor:T,getRange:function(){return this._currentRange},saveRange:function(t){if(t)return void(this._currentRange=t);var e=window.getSelection();if(0!==e.rangeCount){var n=e.getRangeAt(0),i=this.getSelectionContainerElem(n);if(i){this.editor.$textElem.isContain(i)&&(this._currentRange=n)}}},collapseRange:function(t){null==t&&(t=!1);var e=this._currentRange;e&&e.collapse(t)},getSelectionText:function(){return this._currentRange?this._currentRange.toString():""},getSelectionContainerElem:function(t){t=t||this._currentRange;var e=void 0;if(t)return e=t.commonAncestorContainer,o(1===e.nodeType?e:e.parentNode)},getSelectionStartElem:function(t){t=t||this._currentRange;var e=void 0;if(t)return e=t.startContainer,o(1===e.nodeType?e:e.parentNode)},getSelectionEndElem:function(t){t=t||this._currentRange;var e=void 0;if(t)return e=t.endContainer,o(1===e.nodeType?e:e.parentNode)},isSelectionEmpty:function(){var t=this._currentRange;return!(!t||!t.startContainer||t.startContainer!==t.endContainer||t.startOffset!==t.endOffset)},restoreSelection:function(){var t=window.getSelection();t.removeAllRanges(),t.addRange(this._currentRange)},createEmptyRange:function(){var t=this.editor,e=this.getRange(),n=void 0;if(e&&this.isSelectionEmpty())try{z.isWebkit()?(t.cmd.do("insertHTML","​"),e.setEnd(e.endContainer,e.endOffset+1),this.saveRange(e)):(n=o(""),t.cmd.do("insertElem",n),this.createRangeByElem(n,!0))}catch(t){}},createRangeByElem:function(t,e,n){if(t.length){var i=t[0],o=document.createRange();n?o.selectNodeContents(i):o.selectNode(i),"boolean"==typeof e&&o.collapse(e),this.saveRange(o)}}},j.prototype={constructor:j,show:function(t){var e=this;if(!this._isShow){this._isShow=!0;var n=this.$bar;if(this._isRender)this._isRender=!0;else{this.$textContainer.append(n)}Date.now()-this._time>100&&t<=1&&(n.css("width",100*t+"%"),this._time=Date.now());var i=this._timeoutId;i&&clearTimeout(i),i=setTimeout(function(){e._hide()},500)}},_hide:function(){this.$bar.remove(),this._time=0,this._isShow=!1,this._isRender=!1}};var q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};H.prototype={constructor:H,_alert:function(t,e){var n=this.editor,i=n.config.debug,o=n.config.customAlert;if(i)throw new Error("wangEditor: "+(e||t));o&&"function"==typeof o?o(t):alert(t)},insertLinkImg:function(t){var e=this;if(t){var n=this.editor,i=n.config,o=i.linkImgCheck,r=void 0;if(o&&"function"==typeof o&&"string"==typeof(r=o(t)))return void alert(r);n.cmd.do("insertHTML",'');var a=document.createElement("img");a.onload=function(){var e=i.linkImgCallback;e&&"function"==typeof e&&e(t),a=null},a.onerror=function(){a=null,e._alert("插入图片错误",'wangEditor: 插入图片出错,图片链接是 "'+t+'",下载该链接失败')},a.onabort=function(){a=null},a.src=t}},uploadImg:function(t){var e=this;if(t&&t.length){var n=this.editor,i=n.config,o=i.uploadImgServer,c=i.uploadImgShowBase64,A=i.uploadImgMaxSize,s=A/1024/1024,l=i.uploadImgMaxLength||1e4,d=i.uploadFileName||"",u=i.uploadImgParams||{},p=i.uploadImgParamsWithUrl,h=i.uploadImgHeaders||{},f=i.uploadImgHooks||{},g=i.uploadImgTimeout||3e3,m=i.withCredentials;null==m&&(m=!1);var w=i.customUploadImg;if(w||o||c){var v=[],b=[];if(a(t,function(t){var e=t.name,n=t.size;if(e&&n)return!1===/\.(jpg|jpeg|png|bmp|gif)$/i.test(e)?void b.push("【"+e+"】不是图片"):Al)return void this._alert("一次最多上传"+l+"张图片");if(w&&"function"==typeof w)return void w(v,this.insertLinkImg.bind(this));var y=new FormData;if(a(v,function(t){var e=d||t.name;y.append(e,t)}),o&&"string"==typeof o){var x=o.split("#");o=x[0];var E=x[1]||"";r(u,function(t,e){e=encodeURIComponent(e),p&&(o.indexOf("?")>0?o+="&":o+="?",o=o+t+"="+e),y.append(t,e)}),E&&(o+="#"+E);var C=new XMLHttpRequest;if(C.open("POST",o),C.timeout=g,C.ontimeout=function(){f.timeout&&"function"==typeof f.timeout&&f.timeout(C,n),e._alert("上传图片超时")},C.upload&&(C.upload.onprogress=function(t){var e=void 0,i=new j(n);t.lengthComputable&&(e=t.loaded/t.total,i.show(e))}),C.onreadystatechange=function(){var t=void 0;if(4===C.readyState){if(C.status<200||C.status>=300)return f.error&&"function"==typeof f.error&&f.error(C,n),void e._alert("上传图片发生错误","上传图片发生错误,服务器返回状态是 "+C.status);if(t=C.responseText,"object"!==(void 0===t?"undefined":q(t)))try{t=JSON.parse(t)}catch(i){return f.fail&&"function"==typeof f.fail&&f.fail(C,n,t),void e._alert("上传图片失败","上传图片返回结果错误,返回结果是: "+t)}if(f.customInsert||"0"==t.errno){if(f.customInsert&&"function"==typeof f.customInsert)f.customInsert(e.insertLinkImg.bind(e),t,n);else{(t.data||[]).forEach(function(t){e.insertLinkImg(t)})}f.success&&"function"==typeof f.success&&f.success(C,n,t)}else f.fail&&"function"==typeof f.fail&&f.fail(C,n,t),e._alert("上传图片失败","上传图片返回结果错误,返回结果 errno="+t.errno)}},f.before&&"function"==typeof f.before){var B=f.before(C,n,v);if(B&&"object"===(void 0===B?"undefined":q(B))&&B.prevent)return void this._alert(B.msg)}return r(h,function(t,e){C.setRequestHeader(t,e)}),C.withCredentials=m,void C.send(y)}c&&a(t,function(t){var n=e,i=new FileReader;i.readAsDataURL(t),i.onload=function(){n.insertLinkImg(this.result)}})}}}};var K=1;Y.prototype={constructor:Y,_initConfig:function(){var t={};this.config=Object.assign(t,P,this.customConfig);var e=this.config.lang||{},n=[];r(e,function(t,e){n.push({reg:new RegExp(t,"img"),val:e})}),this.config.langArgs=n},_initDom:function(){var t=this,e=this.toolbarSelector,n=o(e),i=this.textSelector,r=this.config,a=r.zIndex,A=void 0,s=void 0,l=void 0,d=void 0;null==i?(A=o("
      "),s=o("
      "),d=n.children(),n.append(A).append(s),A.css("background-color","#f1f1f1").css("border","1px solid #ccc"),s.css("border","1px solid #ccc").css("border-top","none").css("height","300px")):(A=n,s=o(i),d=s.children()),l=o("
      "),l.attr("contenteditable","true").css("width","100%").css("height","100%"),d&&d.length?l.append(d):l.append(o("


      ")),s.append(l),A.addClass("w-e-toolbar"),s.addClass("w-e-text-container"),s.css("z-index",a),l.addClass("w-e-text");var u=c("toolbar-elem");A.attr("id",u);var p=c("text-elem");l.attr("id",p),this.$toolbarElem=A,this.$textContainerElem=s,this.$textElem=l,this.toolbarElemId=u,this.textElemId=p;var h=!0;s.on("compositionstart",function(){h=!1}),s.on("compositionend",function(){h=!0}),s.on("click keyup",function(){h&&t.change&&t.change()}),A.on("click",function(){this.change&&this.change()}),(r.onfocus||r.onblur)&&(this.isFocus=!1,o(document).on("click",function(e){var n=l.isContain(o(e.target)),i=A.isContain(o(e.target)),r=A[0]==e.target;if(n)t.isFocus||t.onfocus&&t.onfocus(),t.isFocus=!0;else{if(i&&!r)return;t.isFocus&&t.onblur&&t.onblur(),t.isFocus=!1}}))},_initCommand:function(){this.cmd=new F(this)},_initSelectionAPI:function(){this.selection=new T(this)},_initUploadImg:function(){this.uploadImg=new H(this)},_initMenus:function(){this.menus=new k(this),this.menus.init()},_initText:function(){this.txt=new R(this),this.txt.init()},initSelection:function(t){var e=this.$textElem,n=e.children();if(!n.length)return e.append(o("


      ")),void this.initSelection();var i=n.last();if(t){var r=i.html().toLowerCase(),a=i.getNodeName();if("
      "!==r&&"
      "!==r||"P"!==a)return e.append(o("


      ")),void this.initSelection()}this.selection.createRangeByElem(i,!1,!0),this.selection.restoreSelection()},_bindEvent:function(){var t=0,e=this.txt.html(),n=this.config,i=n.onchangeTimeout;(!(i=parseInt(i,10))||i<=0)&&(i=200);var o=n.onchange;o&&"function"==typeof o&&(this.change=function(){var n=this.txt.html();n.length===e.length&&n===e||(t&&clearTimeout(t),t=setTimeout(function(){o(n),e=n},i))});var r=n.onblur;r&&"function"==typeof r&&(this.onblur=function(){var t=this.txt.html();r(t)});var a=n.onfocus;a&&"function"==typeof a&&(this.onfocus=function(){a()})},create:function(){this._initConfig(),this._initDom(),this._initCommand(),this._initSelectionAPI(),this._initText(),this._initMenus(),this._initUploadImg(),this.initSelection(!0),this._bindEvent()},_offAllEvent:function(){o.offAll()}};try{document}catch(t){throw new Error("请在浏览器环境下运行")}!function(){"function"!=typeof Object.assign&&(Object.assign=function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),i=1;i=0&&e.item(n)!==this;);return n>-1})}();var V=document.createElement("style");return V.type="text/css", V.innerHTML='.w-e-toolbar,.w-e-text-container,.w-e-menu-panel { padding: 0; margin: 0; box-sizing: border-box;}.w-e-toolbar *,.w-e-text-container *,.w-e-menu-panel * { padding: 0; margin: 0; box-sizing: border-box;}.w-e-clear-fix:after { content: ""; display: table; clear: both;}.w-e-toolbar .w-e-droplist { position: absolute; left: 0; top: 0; background-color: #fff; border: 1px solid #f1f1f1; border-right-color: #ccc; border-bottom-color: #ccc;}.w-e-toolbar .w-e-droplist .w-e-dp-title { text-align: center; color: #999; line-height: 2; border-bottom: 1px solid #f1f1f1; font-size: 13px;}.w-e-toolbar .w-e-droplist ul.w-e-list { list-style: none; line-height: 1;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { color: #333; padding: 5px 0;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { background-color: #f1f1f1;}.w-e-toolbar .w-e-droplist ul.w-e-block { list-style: none; text-align: left; padding: 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { display: inline-block; *display: inline; *zoom: 1; padding: 3px 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { background-color: #f1f1f1;}@font-face { font-family: \'w-e-icon\'; src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAABXAAAsAAAAAFXQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIPAmNtYXAAAAFoAAAA9AAAAPRAxxN6Z2FzcAAAAlwAAAAIAAAACAAAABBnbHlmAAACZAAAEHwAABB8kRGt5WhlYWQAABLgAAAANgAAADYN4rlyaGhlYQAAExgAAAAkAAAAJAfEA99obXR4AAATPAAAAHwAAAB8cAcDvGxvY2EAABO4AAAAQAAAAEAx8jYEbWF4cAAAE/gAAAAgAAAAIAAqALZuYW1lAAAUGAAAAYYAAAGGmUoJ+3Bvc3QAABWgAAAAIAAAACAAAwAAAAMD3AGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA8fwDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEANgAAAAyACAABAASAAEAIOkG6Q3pEulH6Wbpd+m56bvpxunL6d/qDepl6mjqcep58A3wFPEg8dzx/P/9//8AAAAAACDpBukN6RLpR+ll6Xfpuem76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A0AKRpY29tb29uAGkAYwBvAG0AbwBvAG5WZXJzaW9uIDEuMABWAGUAcgBzAGkAbwBuACAAMQAuADBpY29tb29uAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG5SZWd1bGFyAFIAZQBnAHUAbABhAHJpY29tb29uAGkAYwBvAG0AbwBvAG5Gb250IGdlbmVyYXRlZCBieSBJY29Nb29uLgBGAG8AbgB0ACAAZwBlAG4AZQByAGEAdABlAGQAIABiAHkAIABJAGMAbwBNAG8AbwBuAC4AAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format(\'truetype\'); font-weight: normal; font-style: normal;}[class^="w-e-icon-"],[class*=" w-e-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: \'w-e-icon\' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.w-e-icon-close:before { content: "\\f00d";}.w-e-icon-upload2:before { content: "\\e9c6";}.w-e-icon-trash-o:before { content: "\\f014";}.w-e-icon-header:before { content: "\\f1dc";}.w-e-icon-pencil2:before { content: "\\e906";}.w-e-icon-paint-brush:before { content: "\\f1fc";}.w-e-icon-image:before { content: "\\e90d";}.w-e-icon-play:before { content: "\\e912";}.w-e-icon-location:before { content: "\\e947";}.w-e-icon-undo:before { content: "\\e965";}.w-e-icon-redo:before { content: "\\e966";}.w-e-icon-quotes-left:before { content: "\\e977";}.w-e-icon-list-numbered:before { content: "\\e9b9";}.w-e-icon-list2:before { content: "\\e9bb";}.w-e-icon-link:before { content: "\\e9cb";}.w-e-icon-happy:before { content: "\\e9df";}.w-e-icon-bold:before { content: "\\ea62";}.w-e-icon-underline:before { content: "\\ea63";}.w-e-icon-italic:before { content: "\\ea64";}.w-e-icon-strikethrough:before { content: "\\ea65";}.w-e-icon-table2:before { content: "\\ea71";}.w-e-icon-paragraph-left:before { content: "\\ea77";}.w-e-icon-paragraph-center:before { content: "\\ea78";}.w-e-icon-paragraph-right:before { content: "\\ea79";}.w-e-icon-terminal:before { content: "\\f120";}.w-e-icon-page-break:before { content: "\\ea68";}.w-e-icon-cancel-circle:before { content: "\\ea0d";}.w-e-toolbar { display: -webkit-box; display: -ms-flexbox; display: flex; padding: 0 5px; /* flex-wrap: wrap; */ /* 单个菜单 */}.w-e-toolbar .w-e-menu { position: relative; text-align: center; padding: 5px 10px; cursor: pointer;}.w-e-toolbar .w-e-menu i { color: #999;}.w-e-toolbar .w-e-menu:hover i { color: #333;}.w-e-toolbar .w-e-active i { color: #1e88e5;}.w-e-toolbar .w-e-active:hover i { color: #1e88e5;}.w-e-text-container .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; /* 为 emotion panel 定制的样式 */ /* 上传图片的 panel 定制样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover { color: #333;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: -webkit-box; display: -ms-flexbox; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px; /* 输入框的样式 */ /* 按钮的样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both;}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block; *display: inline; *zoom: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container { text-align: center;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn { display: inline-block; *display: inline; *zoom: 1; color: #999; cursor: pointer; font-size: 60px; line-height: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover { color: #333;}.w-e-text-container { position: relative;}.w-e-text-container .w-e-progress { position: absolute; background-color: #1e88e5; bottom: 0; left: 0; height: 1px;}.w-e-text { padding: 0 10px; overflow-y: scroll;}.w-e-text p,.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text table,.w-e-text pre { margin: 10px 0; line-height: 1.5;}.w-e-text ul,.w-e-text ol { margin: 10px 0 10px 20px;}.w-e-text blockquote { display: block; border-left: 8px solid #d0e5f2; padding: 5px 10px; margin: 10px 0; line-height: 1.4; font-size: 100%; background-color: #f1f1f1;}.w-e-text code { display: inline-block; *display: inline; *zoom: 1; background-color: #f1f1f1; border-radius: 3px; padding: 3px 5px; margin: 0 3px;}.w-e-text pre code { display: block;}.w-e-text table { border-top: 1px solid #ccc; border-left: 1px solid #ccc;}.w-e-text table td,.w-e-text table th { border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px;}.w-e-text table th { border-bottom: 2px solid #ccc; text-align: center;}.w-e-text:focus { outline: none;}.w-e-text img { cursor: pointer;}.w-e-text img:hover { box-shadow: 0 0 5px #333;}',document.getElementsByTagName("HEAD").item(0).appendChild(V),window.wangEditor||Y}); //# sourceMappingURL=wangEditor.min.js.map