{"version":3,"sources":["webpack:///./node_modules/_wangeditor@3.1.1@wangeditor/release/wangEditor.js","webpack:///./src/components/fuEditor/index.vue?77fc","webpack:///src/components/fuEditor/index.vue","webpack:///./src/components/fuEditor/index.vue?8a78","webpack:///./src/components/fuEditor/index.vue","webpack:///./src/components/fuEditor/index.vue?f47f"],"names":["global","factory","module","exports","this","polyfill","Object","assign","target","varArgs","TypeError","to","index","arguments","length","nextSource","nextKey","prototype","hasOwnProperty","call","Element","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","s","document","ownerDocument","querySelectorAll","i","item","createElemByHTML","html","div","createElement","innerHTML","children","isDOMList","selector","HTMLCollection","NodeList","result","eventList","DomElement","nodeType","selectorResult","Array","replace","trim","indexOf","$","constructor","forEach","fn","elem","clone","deep","cloneList","push","cloneNode","get","first","last","on","type","types","split","addEventListener","e","off","removeEventListener","attr","key","val","getAttribute","setAttribute","addClass","className","arr","filter","join","removeClass","css","currentStyle","style","styleArr","resultArr","map","show","hide","childNodes","append","$children","child","appendChild","remove","parent","parentElement","removeChild","isContain","$child","contains","getSizeData","getBoundingClientRect","getNodeName","nodeName","find","text","value","focus","parentUntil","_currentElem","results","equal","$elem","insertBefore","$referenceNode","referenceNode","parentNode","insertAfter","lastChild","nextSibling","offAll","config","menus","fontNames","colors","emotions","title","content","alt","src","zIndex","debug","linkCheck","link","linkImgCheck","pasteFilterStyle","pasteIgnoreImg","pasteTextHandle","showLinkImg","linkImgCallback","url","uploadImgMaxSize","uploadImgShowBase64","uploadFileName","uploadImgParams","uploadImgHeaders","withCredentials","uploadImgTimeout","uploadImgHooks","before","xhr","editor","files","success","fail","error","timeout","qiniu","UA","_ua","navigator","userAgent","isWebkit","reg","test","isIE","window","objForEach","obj","arrForEach","fakeArr","getRandom","prefix","Math","random","toString","slice","replaceHtmlSymbol","isFunction","Bold","_active","onClick","isSeleEmpty","selection","isSelectionEmpty","createEmptyRange","cmd","do","collapseRange","restoreSelection","tryChangeActive","queryCommandState","replaceLang","str","langArgs","_emptyFn","DropList","menu","opt","_this","$container","$title","titleHtml","list","$list","elemHtml","$li","hideTimeoutId","setTimeout","_rendered","_show","Head","droplist","width","_command","FontSize","FontName","fontName","clearTimeout","$menuELem","menuHeight","height","showTimeoutId","$selectionElem","getSelectionContainerElem","$textElem","cmdValue","queryCommandValue","emptyFn","_isCreatedPanelMenus","Panel","Link","Italic","Redo","StrikeThrough","Underline","Undo","List","Justify","ForeColor","color","BackColor","Quote","Code","Emoticon","Table","Video","Image","imgMenuId","$body","$textContainerElem","$closeBtn","$tabTitleContainer","$tabContentContainer","tabs","tabTitleArr","tabContentArr","tab","tabIndex","tpl","$content","_index","stopPropagation","events","event","needToHide","$inputs","_hideOtherPanels","panel","$linkelem","createRangeByElem","_createPanel","getSelectionText","inputLinkId","inputTextId","btnOkId","btnDelId","delBtnDisplay","$link","$text","_insertLink","_delLink","$selectionELem","selectionText","checkResult","alert","$parent","$targetELem","$startElem","getSelectionStartElem","$endElem","getSelectionEndElem","$code","textId","btnId","_insertCode","_updateCode","$parentElem","tabConfig","emotData","emotType","faceHtml","$target","insertHtml","_insert","emotHtml","_createEditPanel","_createInsertPanel","btnInsertId","textRowNum","textColNum","rowNum","parseInt","colNum","r","c","_this2","addRowBtnId","addColBtnId","delRowBtnId","delColBtnId","delTableBtnId","_addRow","_addCol","_delRow","_delCol","_delTable","_getLocationData","$tr","$tds","tdLength","td","$tbody","$trs","trLength","tr","locationData","trData","$currentTr","tdData","newTr","tdIndex","$trParent","$currentTd","name","toLowerCase","newTd","$table","textValId","width30","width50","width100","delBtn","tabsConfig","$img","_selectedImg","uploadImg","upTriggerId","upFileId","linkUrlId","linkBtnId","$file","fileElem","click","fileList","$linkUrl","insertLinkImg","tabsConfigResult","uploadImgServer","customUploadImg","FileReader","MenuConstructors","Menus","getPasteText","clipboardData","originalEvent","pasteText","getData","getPasteHtml","filterStyle","ignoreImg","pasteHtml","docSplitHtml","getPasteImgs","txt","items","getAsFile","getChildrenJSON","curElem","elemResult","textContent","tag","attrData","attrList","attributes","attrListLength","attrs","Text","Command","API","_currentRange","Progress","_time","_isShow","_isRender","_timeoutId","$textContainer","$bar","bold","head","fontSize","italic","redo","strikeThrough","underline","undo","justify","foreColor","backColor","quote","code","emoticon","table","video","image","init","configMenus","menuKey","MenuConstructor","_addToToolbar","_bindEvent","$toolbarElem","getRange","changeActive","clear","initSelection","getJSON","_saveRangeRealTime","_enterKeyHandle","_clearHandle","_pasteHandle","_tabHandle","_imgHandle","_dragHandle","saveRange","insertEmptyP","$p","pHandle","codeHandle","selectionNodeName","parentNodeName","queryCommandSupported","_willBreakCode","preventDefault","_startOffset","startOffset","codeLength","keyCode","txtHtml","pasteTime","canDo","now","Date","flag","resetTime","ex","pasteFiles","img","$document","dataTransfer","_useStyleWithCSS","execCommand","_name","_execCommand","change","_insertHTML","range","insertNode","deleteContents","pasteHTML","_insertElem","_range","getSelection","rangeCount","getRangeAt","$containerElem","toStart","collapse","commonAncestorContainer","startContainer","endContainer","endOffset","removeAllRanges","addRange","setEnd","isContent","createRange","selectNodeContents","selectNode","progress","timeoutId","_hide","_typeof","Symbol","iterator","UploadImg","_alert","alertInfo","debugInfo","customAlert","Error","onload","callback","onerror","onabort","_this3","maxSize","maxSizeM","maxLength","uploadImgMaxLength","uploadImgParamsWithUrl","hooks","resultFiles","errInfo","file","size","bind","formdata","FormData","uploadImgServerArr","uploadImgServerHash","XMLHttpRequest","open","ontimeout","upload","onprogress","percent","progressBar","lengthComputable","loaded","total","onreadystatechange","readyState","status","responseText","JSON","parse","customInsert","errno","data","beforeResult","prevent","msg","setRequestHeader","send","reader","readAsDataURL","editorId","Editor","toolbarSelector","textSelector","id","customConfig","_initConfig","langConfig","lang","RegExp","_initDom","$toolbarSelector","config$$1","toolbarElemId","textElemId","compositionEnd","onfocus","onblur","isFocus","isChild","isToolbar","isMenu","_initCommand","_initSelectionAPI","_initUploadImg","_initMenus","_initText","newLine","$last","onChangeTimeoutId","beforeChangeHtml","onchangeTimeout","onchange","currentHtml","create","_offAllEvent","inlinecss","getElementsByTagName","wangEditor","render","_vm","_h","$createElement","_c","_self","staticClass","ref","staticRenderFns","info_","model","prop","props","String","default","isClear","Boolean","watch","mounted","seteditor","methods","console","log","insertImg","component"],"mappings":"gIAAC,SAAUA,EAAQC,GAC6CC,EAAOC,QAAUF,KADjF,CAIEG,GAAM,WAAe,aAMvB,IAAIC,EAAW,WAGiB,mBAAjBC,OAAOC,SACdD,OAAOC,OAAS,SAAUC,EAAQC,GAE9B,GAAc,MAAVD,EAEA,MAAM,IAAIE,UAAU,8CAKxB,IAFA,IAAIC,EAAKL,OAAOE,GAEPI,EAAQ,EAAGA,EAAQC,UAAUC,OAAQF,IAAS,CACnD,IAAIG,EAAaF,UAAUD,GAE3B,GAAkB,MAAdG,EAEA,IAAK,IAAIC,KAAWD,EAEZT,OAAOW,UAAUC,eAAeC,KAAKJ,EAAYC,KACjDL,EAAGK,GAAWD,EAAWC,IAKzC,OAAOL,IAKVS,QAAQH,UAAUI,UACnBD,QAAQH,UAAUI,QAAUD,QAAQH,UAAUK,iBAAmBF,QAAQH,UAAUM,oBAAsBH,QAAQH,UAAUO,mBAAqBJ,QAAQH,UAAUQ,kBAAoBL,QAAQH,UAAUS,uBAAyB,SAAUC,GACvO,IAAIN,GAAWjB,KAAKwB,UAAYxB,KAAKyB,eAAeC,iBAAiBH,GACjEI,EAAIV,EAAQP,OAChB,QAASiB,GAAK,GAAKV,EAAQW,KAAKD,KAAO3B,MACvC,OAAO2B,GAAK,KAUxB,SAASE,EAAiBC,GACtB,IAAIC,OAAM,EAGV,OAFAA,EAAMP,SAASQ,cAAc,OAC7BD,EAAIE,UAAYH,EACTC,EAAIG,SAIf,SAASC,EAAUC,GACf,QAAKA,IAGDA,aAAoBC,gBAAkBD,aAAoBE,UAOlE,SAASZ,EAAiBU,GACtB,IAAIG,EAASf,SAASE,iBAAiBU,GACvC,OAAID,EAAUI,GACHA,EAEA,CAACA,GAK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G,QAE5B8f,QAAS,CACPD,UADJ,WACA,WAGMvmB,KAAKuJ,OAAS,IAAI,EAAxB,wCACMvJ,KAAKuJ,OAAO2Z,aAAapa,qBAAsB,EAC/C9I,KAAKuJ,OAAO2Z,aAAalM,gBAC/B,wBACMhX,KAAKuJ,OAAO2Z,aAAaja,iBAAmB,GAC5CjJ,KAAKuJ,OAAO2Z,aAAana,eAAiB,OAC1C/I,KAAKuJ,OAAO2Z,aAAara,iBAAmB,QAC5C7I,KAAKuJ,OAAO2Z,aAAa3C,mBAAqB,EAC9CvgB,KAAKuJ,OAAO2Z,aAAa/Z,iBAAmB,KAG5CnJ,KAAKuJ,OAAO2Z,aAAaxb,MAAQ,CACvC,OACM,OACA,WACA,WACA,SACA,YACA,gBACA,YACA,YACA,OACA,OACA,UACA,QACA,WACA,QACA,QACA,QACA,OACA,OACA,OACA,cAGA1H,KAAKuJ,OAAO2Z,aAAa9Z,eAAiB,CACxCM,KAAM,SAAd,SAGQD,QAAS,SAAjB,SAGQG,QAAS,SAAjB,OAGQD,MAAO,SAAf,OAGQwY,aAAc,SAAtB,OAQU,IAAV,aACUsE,QAAQC,IAAInkB,GACZokB,EAAU/d,KAId5I,KAAKuJ,OAAO2Z,aAAa2B,SAAW,SAA1C,GACQ,EAAR,QACQ,EAAR,yBAGM7kB,KAAKuJ,OAAOwb,YC5Hgb,I,wBCQ9b6B,EAAY,eACd,EACAxB,EACAQ,GACA,EACA,KACA,WACA,MAIa,OAAAgB,E,6CCnBf","file":"js/chunk-6cf4df16.9fbedacd.js","sourcesContent":["(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.wangEditor = factory());\n}(this, (function () { 'use strict';\n\n/*\n poly-fill\n*/\n\nvar polyfill = function () {\n\n // Object.assign\n if (typeof Object.assign != 'function') {\n Object.assign = function (target, varArgs) {\n // .length of function is 2\n if (target == null) {\n // TypeError if undefined or null\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var to = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n\n if (nextSource != null) {\n // Skip over if undefined or null\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n };\n }\n\n // IE 中兼容 Element.prototype.matches\n if (!Element.prototype.matches) {\n Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function (s) {\n var matches = (this.document || this.ownerDocument).querySelectorAll(s),\n i = matches.length;\n while (--i >= 0 && matches.item(i) !== this) {}\n return i > -1;\n };\n }\n};\n\n/*\n DOM 操作 API\n*/\n\n// 根据 html 代码片段创建 dom 对象\nfunction createElemByHTML(html) {\n var div = void 0;\n div = document.createElement('div');\n div.innerHTML = html;\n return div.children;\n}\n\n// 是否是 DOM List\nfunction isDOMList(selector) {\n if (!selector) {\n return false;\n }\n if (selector instanceof HTMLCollection || selector instanceof NodeList) {\n return true;\n }\n return false;\n}\n\n// 封装 document.querySelectorAll\nfunction querySelectorAll(selector) {\n var result = document.querySelectorAll(selector);\n if (isDOMList(result)) {\n return result;\n } else {\n return [result];\n }\n}\n\n// 记录所有的事件绑定\nvar eventList = [];\n\n// 创建构造函数\nfunction DomElement(selector) {\n if (!selector) {\n return;\n }\n\n // selector 本来就是 DomElement 对象,直接返回\n if (selector instanceof DomElement) {\n return selector;\n }\n\n this.selector = selector;\n var nodeType = selector.nodeType;\n\n // 根据 selector 得出的结果(如 DOM,DOM List)\n var selectorResult = [];\n if (nodeType === 9) {\n // document 节点\n selectorResult = [selector];\n } else if (nodeType === 1) {\n // 单个 DOM 节点\n selectorResult = [selector];\n } else if (isDOMList(selector) || selector instanceof Array) {\n // DOM List 或者数组\n selectorResult = selector;\n } else if (typeof selector === 'string') {\n // 字符串\n selector = selector.replace('/\\n/mg', '').trim();\n if (selector.indexOf('<') === 0) {\n // 如
设置标题
'),\n type: 'list', // droplist 以列表形式展示\n list: [{ $elem: $('正文
'), value: '' }],\n onClick: function onClick(value) {\n // 注意 this 是指向当前的 Head 对象\n _this._command(value);\n }\n });\n}\n\n// 原型\nHead.prototype = {\n constructor: Head,\n\n // 执行命令\n _command: function _command(value) {\n var editor = this.editor;\n\n var $selectionElem = editor.selection.getSelectionContainerElem();\n if (editor.$textElem.equal($selectionElem)) {\n // 不能选中多行来设置标题,否则会出现问题\n // 例如选中的是
xxx
yyy
来设置标题,设置之后会成为字号
'),\n type: 'list', // droplist 以列表形式展示\n list: [{ $elem: $('x-small'), value: '1' }, { $elem: $('small'), value: '2' }, { $elem: $('normal'), value: '3' }, { $elem: $('large'), value: '4' }, { $elem: $('x-large'), value: '5' }, { $elem: $('xx-large'), value: '6' }],\n onClick: function onClick(value) {\n // 注意 this 是指向当前的 FontSize 对象\n _this._command(value);\n }\n });\n}\n\n// 原型\nFontSize.prototype = {\n constructor: FontSize,\n\n // 执行命令\n _command: function _command(value) {\n var editor = this.editor;\n editor.cmd.do('fontSize', value);\n }\n};\n\n/*\n menu - fontName\n*/\n\n// 构造函数\nfunction FontName(editor) {\n var _this = this;\n\n this.editor = editor;\n this.$elem = $(' ');\n this.type = 'droplist';\n\n // 当前是否 active 状态\n this._active = false;\n\n // 获取配置的字体\n var config = editor.config;\n var fontNames = config.fontNames || [];\n\n // 初始化 droplist\n this.droplist = new DropList(this, {\n width: 100,\n $title: $('字体
'),\n type: 'list', // droplist 以列表形式展示\n list: fontNames.map(function (fontName) {\n return { $elem: $('' + fontName + ''), value: fontName };\n }),\n onClick: function onClick(value) {\n // 注意 this 是指向当前的 FontName 对象\n _this._command(value);\n }\n });\n}\n\n// 原型\nFontName.prototype = {\n constructor: FontName,\n\n _command: function _command(value) {\n var editor = this.editor;\n editor.cmd.do('fontName', value);\n }\n};\n\n/*\n panel\n*/\n\nvar emptyFn = function emptyFn() {};\n\n// 记录已经显示 panel 的菜单\nvar _isCreatedPanelMenus = [];\n\n// 构造函数\nfunction Panel(menu, opt) {\n this.menu = menu;\n this.opt = opt;\n}\n\n// 原型\nPanel.prototype = {\n constructor: Panel,\n\n // 显示(插入DOM)\n show: function show() {\n var _this = this;\n\n var menu = this.menu;\n if (_isCreatedPanelMenus.indexOf(menu) >= 0) {\n // 该菜单已经创建了 panel 不能再创建\n return;\n }\n\n var editor = menu.editor;\n var $body = $('body');\n var $textContainerElem = editor.$textContainerElem;\n var opt = this.opt;\n\n // panel 的容器\n var $container = $('');\n var width = opt.width || 300; // 默认 300px\n $container.css('width', width + 'px').css('margin-left', (0 - width) / 2 + 'px');\n\n // 添加关闭按钮\n var $closeBtn = $('');\n $container.append($closeBtn);\n $closeBtn.on('click', function () {\n _this.hide();\n });\n\n // 准备 tabs 容器\n var $tabTitleContainer = $('设置列表
'),\n type: 'list', // droplist 以列表形式展示\n list: [{ $elem: $(' 有序列表'), value: 'insertOrderedList' }, { $elem: $(' 无序列表'), value: 'insertUnorderedList' }],\n onClick: function onClick(value) {\n // 注意 this 是指向当前的 List 对象\n _this._command(value);\n }\n });\n}\n\n// 原型\nList.prototype = {\n constructor: List,\n\n // 执行命令\n _command: function _command(value) {\n var editor = this.editor;\n var $textElem = editor.$textElem;\n editor.selection.restoreSelection();\n if (editor.cmd.queryCommandState(value)) {\n return;\n }\n editor.cmd.do(value);\n\n // 验证列表是否被包裹在之内\n var $selectionElem = editor.selection.getSelectionContainerElem();\n if ($selectionElem.getNodeName() === 'LI') {\n $selectionElem = $selectionElem.parent();\n }\n if (/^ol|ul$/i.test($selectionElem.getNodeName()) === false) {\n return;\n }\n if ($selectionElem.equal($textElem)) {\n // 证明是顶级标签,没有被
包裹\n return;\n }\n var $parent = $selectionElem.parent();\n if ($parent.equal($textElem)) {\n // $parent 是顶级标签,不能删除\n return;\n }\n\n $selectionElem.insertAfter($parent);\n $parent.remove();\n },\n\n // 试图改变 active 状态\n tryChangeActive: function tryChangeActive(e) {\n var editor = this.editor;\n var $elem = this.$elem;\n if (editor.cmd.queryCommandState('insertUnOrderedList') || editor.cmd.queryCommandState('insertOrderedList')) {\n this._active = true;\n $elem.addClass('w-e-active');\n } else {\n this._active = false;\n $elem.removeClass('w-e-active');\n }\n }\n};\n\n/*\n menu - justify\n*/\n// 构造函数\nfunction Justify(editor) {\n var _this = this;\n\n this.editor = editor;\n this.$elem = $('
');\n this.type = 'droplist';\n\n // 当前是否 active 状态\n this._active = false;\n\n // 初始化 droplist\n this.droplist = new DropList(this, {\n width: 100,\n $title: $('对齐方式
'),\n type: 'list', // droplist 以列表形式展示\n list: [{ $elem: $(' 靠左'), value: 'justifyLeft' }, { $elem: $(' 居中'), value: 'justifyCenter' }, { $elem: $(' 靠右'), value: 'justifyRight' }],\n onClick: function onClick(value) {\n // 注意 this 是指向当前的 List 对象\n _this._command(value);\n }\n });\n}\n\n// 原型\nJustify.prototype = {\n constructor: Justify,\n\n // 执行命令\n _command: function _command(value) {\n var editor = this.editor;\n editor.cmd.do(value);\n }\n};\n\n/*\n menu - Forecolor\n*/\n// 构造函数\nfunction ForeColor(editor) {\n var _this = this;\n\n this.editor = editor;\n this.$elem = $(' ');\n this.type = 'droplist';\n\n // 获取配置的颜色\n var config = editor.config;\n var colors = config.colors || [];\n\n // 当前是否 active 状态\n this._active = false;\n\n // 初始化 droplist\n this.droplist = new DropList(this, {\n width: 120,\n $title: $('文字颜色
'),\n type: 'inline-block', // droplist 内容以 block 形式展示\n list: colors.map(function (color) {\n return { $elem: $(''), value: color };\n }),\n onClick: function onClick(value) {\n // 注意 this 是指向当前的 ForeColor 对象\n _this._command(value);\n }\n });\n}\n\n// 原型\nForeColor.prototype = {\n constructor: ForeColor,\n\n // 执行命令\n _command: function _command(value) {\n var editor = this.editor;\n editor.cmd.do('foreColor', value);\n }\n};\n\n/*\n menu - BackColor\n*/\n// 构造函数\nfunction BackColor(editor) {\n var _this = this;\n\n this.editor = editor;\n this.$elem = $(' ');\n this.type = 'droplist';\n\n // 获取配置的颜色\n var config = editor.config;\n var colors = config.colors || [];\n\n // 当前是否 active 状态\n this._active = false;\n\n // 初始化 droplist\n this.droplist = new DropList(this, {\n width: 120,\n $title: $('背景色
'),\n type: 'inline-block', // droplist 内容以 block 形式展示\n list: colors.map(function (color) {\n return { $elem: $(''), value: color };\n }),\n onClick: function onClick(value) {\n // 注意 this 是指向当前的 BackColor 对象\n _this._command(value);\n }\n });\n}\n\n// 原型\nBackColor.prototype = {\n constructor: BackColor,\n\n // 执行命令\n _command: function _command(value) {\n var editor = this.editor;\n editor.cmd.do('backColor', value);\n }\n};\n\n/*\n menu - quote\n*/\n// 构造函数\nfunction Quote(editor) {\n this.editor = editor;\n this.$elem = $(' ');\n this.type = 'click';\n\n // 当前是否 active 状态\n this._active = false;\n}\n\n// 原型\nQuote.prototype = {\n constructor: Quote,\n\n onClick: function onClick(e) {\n var editor = this.editor;\n var $selectionElem = editor.selection.getSelectionContainerElem();\n var nodeName = $selectionElem.getNodeName();\n\n if (!UA.isIE()) {\n if (nodeName === 'BLOCKQUOTE') {\n // 撤销 quote\n editor.cmd.do('formatBlock', '');\n } else {\n // 转换为 quote\n editor.cmd.do('formatBlock', '
');\n }\n return;\n }\n\n // IE 中不支持 formatBlock,要用其他方式兼容\n var content = void 0,\n $targetELem = void 0;\n if (nodeName === 'P') {\n // 将 P 转换为 quote\n content = $selectionElem.text();\n $targetELem = $('' + content + '');\n $targetELem.insertAfter($selectionElem);\n $selectionElem.remove();\n return;\n }\n if (nodeName === 'BLOCKQUOTE') {\n // 撤销 quote\n content = $selectionElem.text();\n $targetELem = $('' + content + '
');\n $targetELem.insertAfter($selectionElem);\n $selectionElem.remove();\n }\n },\n\n tryChangeActive: function tryChangeActive(e) {\n var editor = this.editor;\n var $elem = this.$elem;\n var reg = /^BLOCKQUOTE$/i;\n var cmdValue = editor.cmd.queryCommandValue('formatBlock');\n if (reg.test(cmdValue)) {\n this._active = true;\n $elem.addClass('w-e-active');\n } else {\n this._active = false;\n $elem.removeClass('w-e-active');\n }\n }\n};\n\n/*\n menu - code\n*/\n// 构造函数\nfunction Code(editor) {\n this.editor = editor;\n this.$elem = $(' ');\n this.type = 'panel';\n\n // 当前是否 active 状态\n this._active = false;\n}\n\n// 原型\nCode.prototype = {\n constructor: Code,\n\n onClick: function onClick(e) {\n var editor = this.editor;\n var $startElem = editor.selection.getSelectionStartElem();\n var $endElem = editor.selection.getSelectionEndElem();\n var isSeleEmpty = editor.selection.isSelectionEmpty();\n var selectionText = editor.selection.getSelectionText();\n var $code = void 0;\n\n if (!$startElem.equal($endElem)) {\n // 跨元素选择,不做处理\n editor.selection.restoreSelection();\n return;\n }\n if (!isSeleEmpty) {\n // 选取不是空,用包裹即可\n $code = $('
' + selectionText + '
');\n editor.cmd.do('insertElem', $code);\n editor.selection.createRangeByElem($code, false);\n editor.selection.restoreSelection();\n return;\n }\n\n // 选取是空,且没有夸元素选择,则插入\n if (this._active) {\n // 选中状态,将编辑内容\n this._createPanel($startElem.html());\n } else {\n // 未选中状态,将创建内容\n this._createPanel();\n }\n },\n\n _createPanel: function _createPanel(value) {\n var _this = this;\n\n // value - 要编辑的内容\n value = value || '';\n var type = !value ? 'new' : 'edit';\n var textId = getRandom('texxt');\n var btnId = getRandom('btn');\n\n var panel = new Panel(this, {\n width: 500,\n // 一个 Panel 包含多个 tab\n tabs: [{\n // 标题\n title: '插入代码',\n // 模板\n tpl: '
\\n \\n\\n',\n // 事件绑定\n events: [\n // 插入代码\n {\n selector: '#' + btnId,\n type: 'click',\n fn: function fn() {\n var $text = $('#' + textId);\n var text = $text.val() || $text.html();\n text = replaceHtmlSymbol(text);\n if (type === 'new') {\n // 新插入\n _this._insertCode(text);\n } else {\n // 编辑更新\n _this._updateCode(text);\n }\n\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }]\n } // first tab end\n ] // tabs end\n }); // new Panel end\n\n // 显示 panel\n panel.show();\n\n // 记录属性\n this.panel = panel;\n },\n\n // 插入代码\n _insertCode: function _insertCode(value) {\n var editor = this.editor;\n editor.cmd.do('insertHTML', '' + value + '
');\n },\n\n // 更新代码\n _updateCode: function _updateCode(value) {\n var editor = this.editor;\n var $selectionELem = editor.selection.getSelectionContainerElem();\n if (!$selectionELem) {\n return;\n }\n $selectionELem.html(value);\n editor.selection.restoreSelection();\n },\n\n // 试图改变 active 状态\n tryChangeActive: function tryChangeActive(e) {\n var editor = this.editor;\n var $elem = this.$elem;\n var $selectionELem = editor.selection.getSelectionContainerElem();\n if (!$selectionELem) {\n return;\n }\n var $parentElem = $selectionELem.parent();\n if ($selectionELem.getNodeName() === 'CODE' && $parentElem.getNodeName() === 'PRE') {\n this._active = true;\n $elem.addClass('w-e-active');\n } else {\n this._active = false;\n $elem.removeClass('w-e-active');\n }\n }\n};\n\n/*\n menu - emoticon\n*/\n// 构造函数\nfunction Emoticon(editor) {\n this.editor = editor;\n this.$elem = $(' ');\n this.type = 'panel';\n\n // 当前是否 active 状态\n this._active = false;\n}\n\n// 原型\nEmoticon.prototype = {\n constructor: Emoticon,\n\n onClick: function onClick() {\n this._createPanel();\n },\n\n _createPanel: function _createPanel() {\n var _this = this;\n\n var editor = this.editor;\n var config = editor.config;\n // 获取表情配置\n var emotions = config.emotions || [];\n\n // 创建表情 dropPanel 的配置\n var tabConfig = [];\n emotions.forEach(function (emotData) {\n var emotType = emotData.type;\n var content = emotData.content || [];\n\n // 这一组表情最终拼接出来的 html\n var faceHtml = '';\n\n // emoji 表情\n if (emotType === 'emoji') {\n content.forEach(function (item) {\n if (item) {\n faceHtml += '' + item + '';\n }\n });\n }\n // 图片表情\n if (emotType === 'image') {\n content.forEach(function (item) {\n var src = item.src;\n var alt = item.alt;\n if (src) {\n // 加一个 data-w-e 属性,点击图片的时候不再提示编辑图片\n faceHtml += '';\n }\n });\n }\n\n tabConfig.push({\n title: emotData.title,\n tpl: '
' + faceHtml + '',\n events: [{\n selector: 'span.w-e-item',\n type: 'click',\n fn: function fn(e) {\n var target = e.target;\n var $target = $(target);\n var nodeName = $target.getNodeName();\n\n var insertHtml = void 0;\n if (nodeName === 'IMG') {\n // 插入图片\n insertHtml = $target.parent().html();\n } else {\n // 插入 emoji\n insertHtml = '' + $target.html() + '';\n }\n\n _this._insert(insertHtml);\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }]\n });\n });\n\n var panel = new Panel(this, {\n width: 300,\n height: 200,\n // 一个 Panel 包含多个 tab\n tabs: tabConfig\n });\n\n // 显示 panel\n panel.show();\n\n // 记录属性\n this.panel = panel;\n },\n\n // 插入表情\n _insert: function _insert(emotHtml) {\n var editor = this.editor;\n editor.cmd.do('insertHTML', emotHtml);\n }\n};\n\n/*\n menu - table\n*/\n// 构造函数\nfunction Table(editor) {\n this.editor = editor;\n this.$elem = $(' ');\n this.type = 'panel';\n\n // 当前是否 active 状态\n this._active = false;\n}\n\n// 原型\nTable.prototype = {\n constructor: Table,\n\n onClick: function onClick() {\n if (this._active) {\n // 编辑现有表格\n this._createEditPanel();\n } else {\n // 插入新表格\n this._createInsertPanel();\n }\n },\n\n // 创建插入新表格的 panel\n _createInsertPanel: function _createInsertPanel() {\n var _this = this;\n\n // 用到的 id\n var btnInsertId = getRandom('btn');\n var textRowNum = getRandom('row');\n var textColNum = getRandom('col');\n\n var panel = new Panel(this, {\n width: 250,\n // panel 包含多个 tab\n tabs: [{\n // 标题\n title: '插入表格',\n // 模板\n tpl: '\\n',\n // 事件绑定\n events: [{\n // 点击按钮,插入表格\n selector: '#' + btnInsertId,\n type: 'click',\n fn: function fn() {\n var rowNum = parseInt($('#' + textRowNum).val());\n var colNum = parseInt($('#' + textColNum).val());\n\n if (rowNum && colNum && rowNum > 0 && colNum > 0) {\n // form 数据有效\n _this._insert(rowNum, colNum);\n }\n\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }]\n } // first tab end\n ] // tabs end\n }); // panel end\n\n // 展示 panel\n panel.show();\n\n // 记录属性\n this.panel = panel;\n },\n\n // 插入表格\n _insert: function _insert(rowNum, colNum) {\n // 拼接 table 模板\n var r = void 0,\n c = void 0;\n var html = '\\n \\u521B\\u5EFA\\n \\n \\u884C\\n \\n \\u5217\\u7684\\u8868\\u683C\\n
\\n \\n';\n for (r = 0; r < rowNum; r++) {\n html += '
';\n if (r === 0) {\n for (c = 0; c < colNum; c++) {\n html += ' ';\n }\n html += '';\n }\n } else {\n for (c = 0; c < colNum; c++) {\n html += ' ';\n }\n }\n html += ' ';\n\n // 执行命令\n var editor = this.editor;\n editor.cmd.do('insertHTML', html);\n\n // 防止 firefox 下出现 resize 的控制点\n editor.cmd.do('enableObjectResizing', false);\n editor.cmd.do('enableInlineTableEditing', false);\n },\n\n // 创建编辑表格的 panel\n _createEditPanel: function _createEditPanel() {\n var _this2 = this;\n\n // 可用的 id\n var addRowBtnId = getRandom('add-row');\n var addColBtnId = getRandom('add-col');\n var delRowBtnId = getRandom('del-row');\n var delColBtnId = getRandom('del-col');\n var delTableBtnId = getRandom('del-table');\n\n // 创建 panel 对象\n var panel = new Panel(this, {\n width: 320,\n // panel 包含多个 tab\n tabs: [{\n // 标题\n title: '编辑表格',\n // 模板\n tpl: '
\\n\\n ',\n // 事件绑定\n events: [{\n // 增加行\n selector: '#' + addRowBtnId,\n type: 'click',\n fn: function fn() {\n _this2._addRow();\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }, {\n // 增加列\n selector: '#' + addColBtnId,\n type: 'click',\n fn: function fn() {\n _this2._addCol();\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }, {\n // 删除行\n selector: '#' + delRowBtnId,\n type: 'click',\n fn: function fn() {\n _this2._delRow();\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }, {\n // 删除列\n selector: '#' + delColBtnId,\n type: 'click',\n fn: function fn() {\n _this2._delCol();\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }, {\n // 删除表格\n selector: '#' + delTableBtnId,\n type: 'click',\n fn: function fn() {\n _this2._delTable();\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }]\n }]\n });\n // 显示 panel\n panel.show();\n },\n\n // 获取选中的单元格的位置信息\n _getLocationData: function _getLocationData() {\n var result = {};\n var editor = this.editor;\n var $selectionELem = editor.selection.getSelectionContainerElem();\n if (!$selectionELem) {\n return;\n }\n var nodeName = $selectionELem.getNodeName();\n if (nodeName !== 'TD' && nodeName !== 'TH') {\n return;\n }\n\n // 获取 td index\n var $tr = $selectionELem.parent();\n var $tds = $tr.children();\n var tdLength = $tds.length;\n $tds.forEach(function (td, index) {\n if (td === $selectionELem[0]) {\n // 记录并跳出循环\n result.td = {\n index: index,\n elem: td,\n length: tdLength\n };\n return false;\n }\n });\n\n // 获取 tr index\n var $tbody = $tr.parent();\n var $trs = $tbody.children();\n var trLength = $trs.length;\n $trs.forEach(function (tr, index) {\n if (tr === $tr[0]) {\n // 记录并跳出循环\n result.tr = {\n index: index,\n elem: tr,\n length: trLength\n };\n return false;\n }\n });\n\n // 返回结果\n return result;\n },\n\n // 增加行\n _addRow: function _addRow() {\n // 获取当前单元格的位置信息\n var locationData = this._getLocationData();\n if (!locationData) {\n return;\n }\n var trData = locationData.tr;\n var $currentTr = $(trData.elem);\n var tdData = locationData.td;\n var tdLength = tdData.length;\n\n // 拼接即将插入的字符串\n var newTr = document.createElement('tr');\n var tpl = '',\n i = void 0;\n for (i = 0; i < tdLength; i++) {\n tpl += '';\n }\n newTr.innerHTML = tpl;\n // 插入\n $(newTr).insertAfter($currentTr);\n },\n\n // 增加列\n _addCol: function _addCol() {\n // 获取当前单元格的位置信息\n var locationData = this._getLocationData();\n if (!locationData) {\n return;\n }\n var trData = locationData.tr;\n var tdData = locationData.td;\n var tdIndex = tdData.index;\n var $currentTr = $(trData.elem);\n var $trParent = $currentTr.parent();\n var $trs = $trParent.children();\n\n // 遍历所有行\n $trs.forEach(function (tr) {\n var $tr = $(tr);\n var $tds = $tr.children();\n var $currentTd = $tds.get(tdIndex);\n var name = $currentTd.getNodeName().toLowerCase();\n\n // new 一个 td,并插入\n var newTd = document.createElement(name);\n $(newTd).insertAfter($currentTd);\n });\n },\n\n // 删除行\n _delRow: function _delRow() {\n // 获取当前单元格的位置信息\n var locationData = this._getLocationData();\n if (!locationData) {\n return;\n }\n var trData = locationData.tr;\n var $currentTr = $(trData.elem);\n $currentTr.remove();\n },\n\n // 删除列\n _delCol: function _delCol() {\n // 获取当前单元格的位置信息\n var locationData = this._getLocationData();\n if (!locationData) {\n return;\n }\n var trData = locationData.tr;\n var tdData = locationData.td;\n var tdIndex = tdData.index;\n var $currentTr = $(trData.elem);\n var $trParent = $currentTr.parent();\n var $trs = $trParent.children();\n\n // 遍历所有行\n $trs.forEach(function (tr) {\n var $tr = $(tr);\n var $tds = $tr.children();\n var $currentTd = $tds.get(tdIndex);\n // 删除\n $currentTd.remove();\n });\n },\n\n // 删除表格\n _delTable: function _delTable() {\n var editor = this.editor;\n var $selectionELem = editor.selection.getSelectionContainerElem();\n if (!$selectionELem) {\n return;\n }\n var $table = $selectionELem.parentUntil('table');\n if (!$table) {\n return;\n }\n $table.remove();\n },\n\n // 试图改变 active 状态\n tryChangeActive: function tryChangeActive(e) {\n var editor = this.editor;\n var $elem = this.$elem;\n var $selectionELem = editor.selection.getSelectionContainerElem();\n if (!$selectionELem) {\n return;\n }\n var nodeName = $selectionELem.getNodeName();\n if (nodeName === 'TD' || nodeName === 'TH') {\n this._active = true;\n $elem.addClass('w-e-active');\n } else {\n this._active = false;\n $elem.removeClass('w-e-active');\n }\n }\n};\n\n/*\n menu - video\n*/\n// 构造函数\nfunction Video(editor) {\n this.editor = editor;\n this.$elem = $(' ');\n this.type = 'panel';\n\n // 当前是否 active 状态\n this._active = false;\n}\n\n// 原型\nVideo.prototype = {\n constructor: Video,\n\n onClick: function onClick() {\n this._createPanel();\n },\n\n _createPanel: function _createPanel() {\n var _this = this;\n\n // 创建 id\n var textValId = getRandom('text-val');\n var btnId = getRandom('btn');\n\n // 创建 panel\n var panel = new Panel(this, {\n width: 350,\n // 一个 panel 多个 tab\n tabs: [{\n // 标题\n title: '插入视频',\n // 模板\n tpl: ' \\n \"/>\\n',\n // 事件绑定\n events: [{\n selector: '#' + btnId,\n type: 'click',\n fn: function fn() {\n var $text = $('#' + textValId);\n var val = $text.val().trim();\n\n // 测试用视频地址\n // \n\n if (val) {\n // 插入视频\n _this._insert(val);\n }\n\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }]\n } // first tab end\n ] // tabs end\n }); // panel end\n\n // 显示 panel\n panel.show();\n\n // 记录属性\n this.panel = panel;\n },\n\n // 插入视频\n _insert: function _insert(val) {\n var editor = this.editor;\n editor.cmd.do('insertHTML', val + ' \\n');\n }\n};\n\n/*\n menu - img\n*/\n// 构造函数\nfunction Image(editor) {\n this.editor = editor;\n var imgMenuId = getRandom('w-e-img');\n this.$elem = $(' ');\n editor.imgMenuId = imgMenuId;\n this.type = 'panel';\n\n // 当前是否 active 状态\n this._active = false;\n}\n\n// 原型\nImage.prototype = {\n constructor: Image,\n\n onClick: function onClick() {\n var editor = this.editor;\n var config = editor.config;\n if (config.qiniu) {\n return;\n }\n if (this._active) {\n this._createEditPanel();\n } else {\n this._createInsertPanel();\n }\n },\n\n _createEditPanel: function _createEditPanel() {\n var editor = this.editor;\n\n // id\n var width30 = getRandom('width-30');\n var width50 = getRandom('width-50');\n var width100 = getRandom('width-100');\n var delBtn = getRandom('del-btn');\n\n // tab 配置\n var tabsConfig = [{\n title: '编辑图片',\n tpl: '
\\n\\n ',\n events: [{\n selector: '#' + width30,\n type: 'click',\n fn: function fn() {\n var $img = editor._selectedImg;\n if ($img) {\n $img.css('max-width', '30%');\n }\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }, {\n selector: '#' + width50,\n type: 'click',\n fn: function fn() {\n var $img = editor._selectedImg;\n if ($img) {\n $img.css('max-width', '50%');\n }\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }, {\n selector: '#' + width100,\n type: 'click',\n fn: function fn() {\n var $img = editor._selectedImg;\n if ($img) {\n $img.css('max-width', '100%');\n }\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }, {\n selector: '#' + delBtn,\n type: 'click',\n fn: function fn() {\n var $img = editor._selectedImg;\n if ($img) {\n $img.remove();\n }\n // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭\n return true;\n }\n }]\n }];\n\n // 创建 panel 并显示\n var panel = new Panel(this, {\n width: 300,\n tabs: tabsConfig\n });\n panel.show();\n\n // 记录属性\n this.panel = panel;\n },\n\n _createInsertPanel: function _createInsertPanel() {\n var editor = this.editor;\n var uploadImg = editor.uploadImg;\n var config = editor.config;\n\n // id\n var upTriggerId = getRandom('up-trigger');\n var upFileId = getRandom('up-file');\n var linkUrlId = getRandom('link-url');\n var linkBtnId = getRandom('link-btn');\n\n // tabs 的配置\n var tabsConfig = [{\n title: '上传图片',\n tpl: '\\n',\n events: [{\n // 触发选择图片\n selector: '#' + upTriggerId,\n type: 'click',\n fn: function fn() {\n var $file = $('#' + upFileId);\n var fileElem = $file[0];\n if (fileElem) {\n fileElem.click();\n } else {\n // 返回 true 可关闭 panel\n return true;\n }\n }\n }, {\n // 选择图片完毕\n selector: '#' + upFileId,\n type: 'change',\n fn: function fn() {\n var $file = $('#' + upFileId);\n var fileElem = $file[0];\n if (!fileElem) {\n // 返回 true 可关闭 panel\n return true;\n }\n\n // 获取选中的 file 对象列表\n var fileList = fileElem.files;\n if (fileList.length) {\n uploadImg.uploadImg(fileList);\n }\n\n // 返回 true 可关闭 panel\n return true;\n }\n }]\n }, // first tab end\n {\n title: '网络图片',\n tpl: '\\n \\n\\n \\n\\n \\n',\n events: [{\n selector: '#' + linkBtnId,\n type: 'click',\n fn: function fn() {\n var $linkUrl = $('#' + linkUrlId);\n var url = $linkUrl.val().trim();\n\n if (url) {\n uploadImg.insertLinkImg(url);\n }\n\n // 返回 true 表示函数执行结束之后关闭 panel\n return true;\n }\n }]\n } // second tab end\n ]; // tabs end\n\n // 判断 tabs 的显示\n var tabsConfigResult = [];\n if ((config.uploadImgShowBase64 || config.uploadImgServer || config.customUploadImg) && window.FileReader) {\n // 显示“上传图片”\n tabsConfigResult.push(tabsConfig[0]);\n }\n if (config.showLinkImg) {\n // 显示“网络图片”\n tabsConfigResult.push(tabsConfig[1]);\n }\n\n // 创建 panel 并显示\n var panel = new Panel(this, {\n width: 300,\n tabs: tabsConfigResult\n });\n panel.show();\n\n // 记录属性\n this.panel = panel;\n },\n\n // 试图改变 active 状态\n tryChangeActive: function tryChangeActive(e) {\n var editor = this.editor;\n var $elem = this.$elem;\n if (editor._selectedImg) {\n this._active = true;\n $elem.addClass('w-e-active');\n } else {\n this._active = false;\n $elem.removeClass('w-e-active');\n }\n }\n};\n\n/*\n 所有菜单的汇总\n*/\n\n// 存储菜单的构造函数\nvar MenuConstructors = {};\n\nMenuConstructors.bold = Bold;\n\nMenuConstructors.head = Head;\n\nMenuConstructors.fontSize = FontSize;\n\nMenuConstructors.fontName = FontName;\n\nMenuConstructors.link = Link;\n\nMenuConstructors.italic = Italic;\n\nMenuConstructors.redo = Redo;\n\nMenuConstructors.strikeThrough = StrikeThrough;\n\nMenuConstructors.underline = Underline;\n\nMenuConstructors.undo = Undo;\n\nMenuConstructors.list = List;\n\nMenuConstructors.justify = Justify;\n\nMenuConstructors.foreColor = ForeColor;\n\nMenuConstructors.backColor = BackColor;\n\nMenuConstructors.quote = Quote;\n\nMenuConstructors.code = Code;\n\nMenuConstructors.emoticon = Emoticon;\n\nMenuConstructors.table = Table;\n\nMenuConstructors.video = Video;\n\nMenuConstructors.image = Image;\n\n/*\n 菜单集合\n*/\n// 构造函数\nfunction Menus(editor) {\n this.editor = editor;\n this.menus = {};\n}\n\n// 修改原型\nMenus.prototype = {\n constructor: Menus,\n\n // 初始化菜单\n init: function init() {\n var _this = this;\n\n var editor = this.editor;\n var config = editor.config || {};\n var configMenus = config.menus || []; // 获取配置中的菜单\n\n // 根据配置信息,创建菜单\n configMenus.forEach(function (menuKey) {\n var MenuConstructor = MenuConstructors[menuKey];\n if (MenuConstructor && typeof MenuConstructor === 'function') {\n // 创建单个菜单\n _this.menus[menuKey] = new MenuConstructor(editor);\n }\n });\n\n // 添加到菜单栏\n this._addToToolbar();\n\n // 绑定事件\n this._bindEvent();\n },\n\n // 添加到菜单栏\n _addToToolbar: function _addToToolbar() {\n var editor = this.editor;\n var $toolbarElem = editor.$toolbarElem;\n var menus = this.menus;\n var config = editor.config;\n // config.zIndex 是配置的编辑区域的 z-index,菜单的 z-index 得在其基础上 +1\n var zIndex = config.zIndex + 1;\n objForEach(menus, function (key, menu) {\n var $elem = menu.$elem;\n if ($elem) {\n // 设置 z-index\n $elem.css('z-index', zIndex);\n $toolbarElem.append($elem);\n }\n });\n },\n\n // 绑定菜单 click mouseenter 事件\n _bindEvent: function _bindEvent() {\n var menus = this.menus;\n var editor = this.editor;\n objForEach(menus, function (key, menu) {\n var type = menu.type;\n if (!type) {\n return;\n }\n var $elem = menu.$elem;\n var droplist = menu.droplist;\n var panel = menu.panel;\n\n // 点击类型,例如 bold\n if (type === 'click' && menu.onClick) {\n $elem.on('click', function (e) {\n if (editor.selection.getRange() == null) {\n return;\n }\n menu.onClick(e);\n });\n }\n\n // 下拉框,例如 head\n if (type === 'droplist' && droplist) {\n $elem.on('mouseenter', function (e) {\n if (editor.selection.getRange() == null) {\n return;\n }\n // 显示\n droplist.showTimeoutId = setTimeout(function () {\n droplist.show();\n }, 200);\n }).on('mouseleave', function (e) {\n // 隐藏\n droplist.hideTimeoutId = setTimeout(function () {\n droplist.hide();\n }, 0);\n });\n }\n\n // 弹框类型,例如 link\n if (type === 'panel' && menu.onClick) {\n $elem.on('click', function (e) {\n e.stopPropagation();\n if (editor.selection.getRange() == null) {\n return;\n }\n // 在自定义事件中显示 panel\n menu.onClick(e);\n });\n }\n });\n },\n\n // 尝试修改菜单状态\n changeActive: function changeActive() {\n var menus = this.menus;\n objForEach(menus, function (key, menu) {\n if (menu.tryChangeActive) {\n setTimeout(function () {\n menu.tryChangeActive();\n }, 100);\n }\n });\n }\n};\n\n/*\n 粘贴信息的处理\n*/\n\n// 获取粘贴的纯文本\nfunction getPasteText(e) {\n var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData;\n var pasteText = void 0;\n if (clipboardData == null) {\n pasteText = window.clipboardData && window.clipboardData.getData('text');\n } else {\n pasteText = clipboardData.getData('text/plain');\n }\n\n return replaceHtmlSymbol(pasteText);\n}\n\n// 获取粘贴的html\nfunction getPasteHtml(e, filterStyle, ignoreImg) {\n var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData;\n var pasteText = void 0,\n pasteHtml = void 0;\n if (clipboardData == null) {\n pasteText = window.clipboardData && window.clipboardData.getData('text');\n } else {\n pasteText = clipboardData.getData('text/plain');\n pasteHtml = clipboardData.getData('text/html');\n }\n if (!pasteHtml && pasteText) {\n pasteHtml = ' \\n' + replaceHtmlSymbol(pasteText) + '
';\n }\n if (!pasteHtml) {\n return;\n }\n\n // 过滤word中状态过来的无用字符\n var docSplitHtml = pasteHtml.split('