From 09c7e86decbf06a4340e183df8b8a244cab3351f Mon Sep 17 00:00:00 2001 From: "jihong.lee" <0125ses@hanmail.net> Date: Mon, 29 Oct 2018 03:12:04 +0900 Subject: [PATCH] version up: 2.5.3 - fix: relative link --- bower.json | 2 +- dist/suneditor.min.js | 2 +- package-lock.json | 2 +- package.json | 2 +- src/plugins/dialog/link.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index fd33229f6..a5eb80727 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "suneditor", - "version": "2.5.2", + "version": "2.5.3", "description": "Pure JavaScript based WYSIWYG web editor", "main": "src/suneditor.js", "keywords": [ diff --git a/dist/suneditor.min.js b/dist/suneditor.min.js index d2648935d..36f309a18 100644 --- a/dist/suneditor.min.js +++ b/dist/suneditor.min.js @@ -1 +1 @@ -!function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="XJR1")}({"0A7J":function(module,__webpack_exports__,__webpack_require__){"use strict";var _modules_colorPicker__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("EjF6");__webpack_exports__.a={name:"fontColor",add:function(core,targetElement){core.addModule([_modules_colorPicker__WEBPACK_IMPORTED_MODULE_0__.a]);const context=core.context;context.fontColor={previewEl:null,colorInput:null};let listDiv=eval(this.setSubmenu(context.colorPicker.colorListHTML));context.fontColor.colorInput=listDiv.getElementsByClassName("sun-editor-id-submenu-color-input")[0],context.fontColor.colorInput.addEventListener("keyup",this.onChangeInput.bind(core)),listDiv.getElementsByClassName("sun-editor-id-submenu-color-submit")[0].addEventListener("click",this.submit.bind(core)),listDiv.getElementsByTagName("UL")[0].addEventListener("click",this.pickup.bind(core)),targetElement.parentNode.appendChild(listDiv),listDiv=null},setSubmenu:function(e){const t=document.createElement("DIV");return t.className="layer_editor",t.style.display="none",t.innerHTML=e,t},on:function(){const e=this.context.colorPicker;e._colorInput=this.context.fontColor.colorInput,e._defaultColor="#000000",e._styleProperty="color",this.plugins.colorPicker.init.call(this,this.getSelectionNode(),null)},onChangeInput:function(e){this.plugins.colorPicker.setCurrentColor.call(this,"#"+e.target.value)},submit:function(){this.plugins.fontColor.applyColor.call(this,this.context.colorPicker._currentColor)},pickup:function(e){if(e.preventDefault(),e.stopPropagation(),!/^BUTTON$/i.test(e.target.tagName))return!1;this.plugins.fontColor.applyColor.call(this,e.target.getAttribute("data-value"))},applyColor:function(e){const t=document.createElement("SPAN");t.style.color=e,this.wrapRangeToTag(t,["color"]),this.submenuOff(),this.focus()}}},"1kvd":function(e,t,i){"use strict";t.a={name:"dialog",add:function(e){const t=e.context;t.dialog={};let i=document.createElement("DIV");i.className="sun-editor-id-dialogBox sun-editor-common";let n=document.createElement("DIV");n.className="modal-dialog-background sun-editor-id-dialog-back",n.style.display="none";let o=document.createElement("DIV");o.className="modal-dialog sun-editor-id-dialog-modal",o.style.display="none",i.appendChild(n),i.appendChild(o),t.dialog.modalArea=i,t.dialog.back=n,t.dialog.modal=o,t.dialog.modal.addEventListener("click",this.onClick_dialog.bind(e)),t.element.topArea.getElementsByClassName("sun-editor-container")[0].appendChild(i),i=null,n=null,o=null},onClick_dialog:function(e){e.stopPropagation(),(/modal-dialog/.test(e.target.className)||/close/.test(e.target.getAttribute("data-command")))&&this.plugins.dialog.closeDialog.call(this)},openDialog:function(e,t,i){if(this.modalForm)return!1;this.context.dialog.updateModal=i,this.context.dialog.modalArea.style.position="full"===t?"fixed":"absolute",this.context.dialog.kind=e,this.modalForm=this.context[e].modal;const n=this.context[e].focusElement;this.context.dialog.modalArea.style.display="block",this.context.dialog.back.style.display="block",this.context.dialog.modal.style.display="block",this.modalForm.style.display="block",n&&n.focus()},closeDialog:function(){this.modalForm.style.display="none",this.context.dialog.back.style.display="none",this.context.dialog.modalArea.style.display="none",this.modalForm=null,this.context.dialog.updateModal=!1,this.plugins[this.context.dialog.kind].init.call(this)}}},"3FqI":function(e,t,i){},"50IV":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_exports__.a={name:"font",add:function(core,targetElement){let listDiv=eval(this.setSubmenu(core.context.user));listDiv.getElementsByClassName("list_family")[0].addEventListener("click",this.pickup.bind(core)),targetElement.parentNode.appendChild(listDiv),listDiv=null},setSubmenu:function(e){const t=document.createElement("DIV");let i,n,o,l;t.className="layer_editor",t.style.display="none";let s=e.font?e.font:["Arial","Comic Sans MS","Courier New,Courier","Georgia","tahoma","Trebuchet MS,Helvetica","Verdana"],a='
",a+="
",t.innerHTML=a,t},pickup:function(e){if(!/^BUTTON$/i.test(e.target.tagName))return!1;e.preventDefault(),e.stopPropagation();const t=e.target;this.util.changeTxt(this.context.tool.font,t.getAttribute("data-txt"));const i=document.createElement("SPAN");i.style.fontFamily=t.getAttribute("data-value"),this.wrapRangeToTag(i,["font-family"]),this.submenuOff(),this.focus()}}},EjF6:function(e,t,i){"use strict";t.a={name:"colorPicker",add:function(e){const t=e.context;t.colorPicker={colorListHTML:"",_colorInput:"",_defaultColor:"#000",_styleProperty:"color",_currentColor:""};let i=this.createColorList(e.context.user,e.lang);t.colorPicker.colorListHTML=i,i=null},createColorList:function(e,t){const i=e.colorList?e.colorList:["#ff0000","#ff5e00","#ffe400","#abf200","#00d8ff","#0055ff","#6600ff","#ff00dd","#000000","#ffd8d8","#fae0d4","#faf4c0","#e4f7ba","#d4f4fa","#d9e5ff","#e8d9ff","#ffd9fa","#ffffff","#ffa7a7","#ffc19e","#faed7d","#cef279","#b2ebf4","#b2ccff","#d1b2ff","#ffb2f5","#bdbdbd","#f15f5f","#f29661","#e5d85c","#bce55c","#5cd1e5","#6699ff","#a366ff","#f261df","#8c8c8c","#980000","#993800","#998a00","#6b9900","#008299","#003399","#3d0099","#990085","#353535","#670000","#662500","#665c00","#476600","#005766","#002266","#290066","#660058","#222222"];let n='
"},init:function(e,t){const i=this.plugins.colorPicker;let n=t||(i.getColorInNode.call(this,e)||this.context.colorPicker._defaultColor);n=i.isHexColor(n)?n:i.rgb2hex(n),i.setInputText.call(this,n)},setCurrentColor:function(e){this.context.colorPicker._currentColor=e,this.context.colorPicker._colorInput.style.borderColor=e},setInputText:function(e){this.context.colorPicker._colorInput.value=e.replace("#",""),this.plugins.colorPicker.setCurrentColor.call(this,e)},getColorInNode:function(e){let t="";const i=this.context.colorPicker._styleProperty;for(;!this.util.isWysiwygDiv(e)&&0===t.length;)1===e.nodeType&&e.style[i]&&(t=e.style[i]),e=e.parentNode;return t},isHexColor:function(e){return/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e)},rgb2hex:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}}},KKur:function(module,__webpack_exports__,__webpack_require__){"use strict";var _modules_dialog__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("1kvd"),_modules_resizing__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("ee5k");__webpack_exports__.a={name:"image",add:function(core){core.addModule([_modules_dialog__WEBPACK_IMPORTED_MODULE_0__.a,_modules_resizing__WEBPACK_IMPORTED_MODULE_1__.a]);const context=core.context;context.image={_linkElement:null,_element:null,_resize_element:null,_element_w:1,_element_h:1,_element_l:0,_element_t:0,_origin_w:context.user.imageSize,_origin_h:0,_altText:"",_imageCaption:null,_linkValue:"",_align:"none",_captionChecked:!1,_proportionChecked:!0,_onCaption:!1,_floatClassRegExp:"float\\-[a-z]+",_xmlHttp:null};let image_dialog=eval(this.setDialog(core.context.user,core.lang));context.image.modal=image_dialog,context.image.imgUrlFile=image_dialog.getElementsByClassName("sun-editor-id-image-url")[0],context.image.imgInputFile=context.image.focusElement=image_dialog.getElementsByClassName("sun-editor-id-image-file")[0],context.image.altText=image_dialog.getElementsByClassName("sun-editor-id-image-alt")[0],context.image.imgLink=image_dialog.getElementsByClassName("sun-editor-id-image-link")[0],context.image.imgLinkNewWindowCheck=image_dialog.getElementsByClassName("sun-editor-id-linkCheck")[0],context.image.caption=image_dialog.querySelector("#suneditor_image_check_caption"),context.image.proportion=image_dialog.querySelector("#suneditor_image_check_proportion"),context.image.imageX=image_dialog.getElementsByClassName("sun-editor-id-image-x")[0],context.image.imageY=image_dialog.getElementsByClassName("sun-editor-id-image-y")[0],context.image.imageX.value=context.user.imageSize,context.image.modal.getElementsByClassName("sun-editor-tab-button")[0].addEventListener("click",this.openTab.bind(core)),context.image.modal.getElementsByClassName("btn-primary")[0].addEventListener("click",this.submit.bind(core)),context.image.imageX.addEventListener("change",this.setInputSize.bind(core,"x")),context.image.imageY.addEventListener("change",this.setInputSize.bind(core,"y")),image_dialog.getElementsByClassName("sun-editor-id-image-revert-button")[0].addEventListener("click",this.sizeRevert.bind(core)),context.dialog.modal.appendChild(image_dialog),image_dialog=null},setDialog:function(e,t){const i=document.createElement("DIV");i.className="modal-content sun-editor-id-dialog-image",i.style.display="none";let n='
",i.innerHTML=n,i},openTab:function(e){const t=this.context.image.modal,i="init"===e?t.getElementsByClassName("sun-editor-id-tab-link")[0]:e.target;if(!/^BUTTON$/i.test(i.tagName))return!1;const n=i.getAttribute("data-tab-link");let o,l,s;for(l=t.getElementsByClassName("sun-editor-id-tab-content"),o=0;o0){const t=this.context.user.imageUploadUrl,i=this.context.dialog.updateModal?1:e.length;if(null!==t&&t.length>0){const n=new FormData;for(let t=0;t0?1:result.length;e0){const n=document.createElement("A");return n.href=/^https?:\/\//.test(t)?t:"http://"+t,n.target=i?"_blank":"",n.setAttribute("data-image-link","image"),n.addEventListener("click",function(e){e.preventDefault()}),e.setAttribute("data-image-link",t),n.appendChild(e),n}return e},setInputSize:function(e){this.context.dialog.updateModal&&this.context.image.proportion.checked&&("x"===e?this.context.image.imageY.value=Math.round(this.context.image._element_h/this.context.image._element_w*this.context.image.imageX.value):this.context.image.imageX.value=Math.round(this.context.image._element_w/this.context.image._element_h*this.context.image.imageY.value))},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation(),this.context.image._linkValue=this.context.image.imgLink.value,this.context.image._altText=this.context.image.altText.value,this.context.image._align=this.context.image.modal.querySelector('input[name="suneditor_image_radio"]:checked').value,this.context.image._captionChecked=this.context.image.caption.checked,this.context.image._proportionChecked=this.context.image.proportion.checked;try{this.context.dialog.updateModal&&this.plugins.image.update_image.call(this),this.context.image.imgInputFile.files.length>0?this.plugins.image.onRender_imgInput.call(this):this.context.image.imgUrlFile.value.trim().length>0?this.plugins.image.onRender_imgUrl.call(this):this.closeLoading()}catch(e){throw this.closeLoading(),Error('[SUNEDITOR.image.submit.fail] cause : "'+e.message+'"')}finally{this.plugins.dialog.closeDialog.call(this)}return!1},create_caption:function(){const e=document.createElement("FIGCAPTION");return e.innerHTML="

"+this.lang.dialogBox.imageBox.caption+"

",e.addEventListener("click",this.plugins.image.toggle_caption_contenteditable.bind(this,!0)),e},set_cover:function(e){const t=document.createElement("FIGURE");return t.className="sun-editor-image-cover",t.appendChild(e),t},set_container:function(e){const t=document.createElement("DIV");return t.className="sun-editor-id-media-container sun-editor-id-image-container",t.setAttribute("contenteditable",!1),t.appendChild(e),t},create_image:function(e,t,i,n,o,l,s){if(l)return void(s.src=e);let a=document.createElement("IMG");a.src=e,a.style.width=n,a.setAttribute("data-align",o),a.setAttribute("data-proportion",this.context.image._proportionChecked),a.alt=this.context.image._altText,a=this.plugins.image.onRender_link(a,t,i);const r=this.plugins.image.set_cover.call(this,a),d=this.plugins.image.set_container.call(this,r);this.context.image._captionChecked&&(this.context.image._imageCaption=this.plugins.image.create_caption.call(this),this.context.image._imageCaption.setAttribute("contenteditable",!1),r.appendChild(this.context.image._imageCaption)),"center"!==o&&(d.style.display="inline-block",this.util.removeClass(d,this.context.image._floatClassRegExp),this.util.addClass(d,"float-"+o)),this.insertNode(d,this.util.getFormatElement(this.getSelectionNode())),this.appendP(d)},update_image:function(){const e=this.context.image,t=e._linkValue;let i=this.util.getParentElement(e._element,".sun-editor-image-cover"),n=this.util.getParentElement(e._element,".sun-editor-id-image-container"),o=e._element,l=!1;if(null===i&&(l=!0,o=e._element.cloneNode(!0),i=this.plugins.image.set_cover.call(this,o)),null===n&&(l=!0,n=this.plugins.image.set_container.call(this,i.cloneNode(!0))),l&&(n.innerHTML="",n.appendChild(i)),this.plugins.image.onRender_imgInput.call(this),o.src=e.imgUrlFile.value,o.alt=e._altText,o.setAttribute("data-proportion",e._proportionChecked),o.style.width=e.imageX.value+"px",o.style.height=e.imageY.value+"px",e._captionChecked?null===e._imageCaption&&(e._imageCaption=this.plugins.image.create_caption.call(this),i.appendChild(e._imageCaption)):e._imageCaption&&(this.util.removeItem(e._imageCaption),e._imageCaption=null),"center"!==e._align?(n.style.display="inline-block",this.util.removeClass(n,this.context.image._floatClassRegExp),this.util.addClass(n,"float-"+e._align)):(n.style.display="",this.util.removeClass(n,this.context.image._floatClassRegExp),this.util.addClass(n,"float-none")),o.setAttribute("data-align",e._align),t.trim().length>0)if(null!==e._linkElement)e._linkElement.href=t,e._linkElement.target=e.imgLinkNewWindowCheck.checked?"_blank":"",o.setAttribute("data-image-link",t);else{let n=this.plugins.image.onRender_link(o,t,this.context.image.imgLinkNewWindowCheck.checked);i.insertBefore(n,e._imageCaption)}else if(null!==e._linkElement){const t=o;t.setAttribute("data-image-link","");let n=t.cloneNode(!0);i.removeChild(e._linkElement),i.insertBefore(n,e._imageCaption),o=n}if(l){const t=this.util.getFormatElement(e._element);t.parentNode.insertBefore(n,t),this.util.removeItem(t)}},toggle_caption_contenteditable:function(e){this.context.image._onCaption=e,this.context.image._imageCaption.setAttribute("contenteditable",e),this.context.image._imageCaption.focus()},sizeRevert:function(){const e=this.context.image;e._origin_w&&(e.imageX.value=e._element_w=e._origin_w,e.imageY.value=e._element_h=e._origin_h)},onModifyMode:function(e,t){const i=this.context.image;i._linkElement=/^A$/i.test(e.parentNode.nodeName)?e.parentNode:null,i._element=i._resize_element=e,i._imageCaption=i._linkElement?i._linkElement.nextElementSibling:e.nextElementSibling,i._element_w=t.w,i._element_h=t.h,i._element_t=t.t,i._element_l=t.l;let n=i._element.getAttribute("data-origin");n?(n=n.split(","),i._origin_w=1*n[0],i._origin_h=1*n[1]):(i._origin_w=t.w,i._origin_h=t.h,i._element.setAttribute("data-origin",t.w+","+t.h))},openModify:function(){const e=this.context.image;e.imgUrlFile.value=e._element.src,e.altText.value=e._element.alt,e.imgLink.value=null===e._linkElement?"":e._linkElement.href,e.imgLinkNewWindowCheck.checked=e._linkElement&&"_blank"===e._linkElement.target,e.modal.querySelector("#suneditor_image_radio_"+(e._element.getAttribute("data-align")||"none")).checked=!0,e._captionChecked=e.caption.checked=!!e._imageCaption,e.proportion.checked=e._proportionChecked="true"===e._element.getAttribute("data-proportion"),e.imageX.value=e._element.offsetWidth,e.imageY.value=e._element.offsetHeight,e.imageY.disabled=!1,e.proportion.disabled=!1,this.plugins.dialog.openDialog.call(this,"image",null,!0)},setSize:function(e,t){this.context.image._resize_element.style.width=e,this.context.image._resize_element.style.height=t},destroy:function(){const e=this.util.getParentElement(this.context.image._element,".sun-editor-id-image-container")||this.context.image._element;this.util.removeItem(e),this.plugins.image.init.call(this)},init:function(){const e=this.context.image;e.imgInputFile.value="",e.imgUrlFile.value="",e.altText.value="",e.imgLink.value="",e.imgLinkNewWindowCheck.checked=!1,e.modal.querySelector("#suneditor_image_radio_none").checked=!0,e.caption.checked=!1,e.proportion.checked=!1,e.imageX.value=this.context.user.imageSize,e.imageY.value="",e.imageY.disabled=!0,e.proportion.disabled=!0,e._element=null,this.plugins.image.openTab.call(this,"init")}}},MIhV:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_exports__.a={name:"fontSize",add:function(core,targetElement){let listDiv=eval(this.setSubmenu(core.context.user));listDiv.getElementsByTagName("UL")[0].addEventListener("click",this.pickup.bind(core)),targetElement.parentNode.appendChild(listDiv),listDiv=null},setSubmenu:function(e){const t=document.createElement("DIV");t.className="layer_editor layer_size",t.style.display="none";const i=e.fontSize?e.fontSize:[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72];let n='
    ';for(let e=0,t=i.length;e"}return n+="
",t.innerHTML=n,t},pickup:function(e){if(e.preventDefault(),e.stopPropagation(),!/^BUTTON$/i.test(e.target.tagName))return!1;this.util.changeTxt(this.context.tool.fontSize,e.target.getAttribute("data-value"));const t=document.createElement("SPAN");t.style.fontSize=e.target.getAttribute("data-value")+"px",this.wrapRangeToTag(t,["font-size"]),this.submenuOff(),this.focus()}}},Rp48:function(module,__webpack_exports__,__webpack_require__){"use strict";var _modules_dialog__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("1kvd");__webpack_exports__.a={name:"link",add:function(core){core.addModule([_modules_dialog__WEBPACK_IMPORTED_MODULE_0__.a]);const context=core.context;context.link={};let link_dialog=eval(this.setDialog(core.lang));context.link.modal=link_dialog,context.link.focusElement=link_dialog.getElementsByClassName("sun-editor-id-link-url")[0],context.link.linkAnchorText=link_dialog.getElementsByClassName("sun-editor-id-link-text")[0],context.link.linkNewWindowCheck=link_dialog.getElementsByClassName("sun-editor-id-link-check")[0];let link_button=eval(this.setController_LinkButton(core.lang));context.link.linkBtn=link_button,context.link._linkAnchor=null,link_dialog.getElementsByClassName("btn-primary")[0].addEventListener("click",this.submit.bind(core)),link_button.addEventListener("click",this.onClick_linkBtn.bind(core)),context.dialog.modal.appendChild(link_dialog),context.element.relative.appendChild(link_button),link_dialog=null,link_button=null},setDialog:function(e){const t=document.createElement("DIV");return t.className="modal-content sun-editor-id-dialog-link",t.style.display="none",t.innerHTML='",t},setController_LinkButton:function(e){const t=document.createElement("DIV");return t.className="sun-editor-id-link-btn",t.style.display="none",t.innerHTML='
',t},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();const t=function(){if(0===this.context.link.focusElement.value.trim().length)return!1;const e=/^https?:\/\//.test(this.context.link.focusElement.value)?this.context.link.focusElement.value:"http://"+this.context.link.focusElement.value,t=this.context.link.linkAnchorText||this.context.dialog.document.getElementById("linkAnchorText"),i=0===t.value.length?e:t.value;if(this.context.dialog.updateModal)this.context.link._linkAnchor.href=e,this.context.link._linkAnchor.textContent=i,this.context.link._linkAnchor.target=this.context.link.linkNewWindowCheck.checked?"_blank":"",this.setRange(this.context.link._linkAnchor.childNodes[0],0,this.context.link._linkAnchor.childNodes[0],this.context.link._linkAnchor.textContent.length);else{const t=document.createElement("A");t.href=e,t.textContent=i,t.target=this.context.link.linkNewWindowCheck.checked?"_blank":"",this.insertNode(t),this.setRange(t.childNodes[0],0,t.childNodes[0],t.textContent.length)}this.context.link.focusElement.value="",this.context.link.linkAnchorText.value=""}.bind(this);try{t()}finally{this.plugins.dialog.closeDialog.call(this),this.closeLoading(),this.focus()}return!1},call_controller_linkButton:function(e){this.editLink=this.context.link._linkAnchor=e;const t=this.context.link.linkBtn;t.getElementsByTagName("A")[0].href=e.href,t.getElementsByTagName("A")[0].textContent=e.textContent;const i=this.util.getOffset(e);t.style.left=i.left+"px",t.style.top=i.top+e.offsetHeight+10+"px",t.style.display="block",this.controllerArray=[t]},onClick_linkBtn:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command")||e.target.parentNode.getAttribute("data-command");t&&(e.preventDefault(),/update/.test(t)?(this.context.link.focusElement.value=this.context.link._linkAnchor.href,this.context.link.linkAnchorText.value=this.context.link._linkAnchor.textContent,this.context.link.linkNewWindowCheck.checked=!!/_blank/i.test(this.context.link._linkAnchor.target),this.plugins.dialog.openDialog.call(this,"link",null,!0)):(this.util.removeItem(this.context.link._linkAnchor),this.context.link._linkAnchor=null,this.focus()),this.controllersOff())},init:function(){const e=this.context.link;e.linkBtn.style.display="none",e._linkAnchor=null,e.focusElement.value="",e.linkAnchorText.value="",e.linkNewWindowCheck.checked=!1}}},VquE:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_exports__.a={name:"table",add:function(core,targetElement){const context=core.context;context.table={_element:null,_tdElement:null,_trElement:null,_trElements:null,_tdIndex:0,_trIndex:0,_tdCnt:0,_trCnt:0,_tableXY:[]};let listDiv=eval(this.setSubmenu()),tablePicker=listDiv.getElementsByClassName("sun-editor-id-table-picker")[0];context.table.tableHighlight=listDiv.getElementsByClassName("sun-editor-id-table-highlighted")[0],context.table.tableUnHighlight=listDiv.getElementsByClassName("sun-editor-id-table-unhighlighted")[0],context.table.tableDisplay=listDiv.getElementsByClassName("sun-editor-table-display")[0];let resizeDiv=eval(this.setController_tableEditor(core.lang));context.table.resizeDiv=resizeDiv,tablePicker.addEventListener("mousemove",this.onMouseMove_tablePicker.bind(core)),tablePicker.addEventListener("click",this.appendTable.bind(core)),resizeDiv.addEventListener("click",this.onClick_resizeDiv.bind(core)),targetElement.parentNode.appendChild(listDiv),context.element.relative.appendChild(resizeDiv),listDiv=null,tablePicker=null,resizeDiv=null},setSubmenu:function(){const e=document.createElement("DIV");return e.className="table-content",e.style.display="none",e.innerHTML='
1 x 1
',e},setController_tableEditor:function(e){const t=document.createElement("DIV");return t.className="sun-editor-id-table-edit",t.style.display="none",t.innerHTML='
',t},appendTable:function(){const e=document.createElement("TABLE");let t=this.context.table._tableXY[0],i=this.context.table._tableXY[1],n="";for(;i>0;){n+="";let e=t;for(;e>0;)n+="

",--e;n+="",--i}n+="",e.innerHTML=n;const o=this.util.getFormatElement(this.getSelectionNode());this.insertNode(e,/^LI$/i.test(o.nodeName)?this.util.getRangeFormatElement(o):o),this.appendP(e),this.focus(),this.plugins.table.reset_table_picker.call(this)},onMouseMove_tablePicker:function(e){e.stopPropagation();let t=Math.ceil(e.offsetX/18),i=Math.ceil(e.offsetY/18);t=t<1?1:t,i=i<1?1:i,this.context.table.tableHighlight.style.width=t+"em",this.context.table.tableHighlight.style.height=i+"em";let n=t<5?5:t>9?10:t+1,o=i<5?5:i>9?10:i+1;this.context.table.tableUnHighlight.style.width=n+"em",this.context.table.tableUnHighlight.style.height=o+"em",this.util.changeTxt(this.context.table.tableDisplay,t+" x "+i),this.context.table._tableXY=[t,i]},reset_table_picker:function(){if(!this.context.table.tableHighlight)return;const e=this.context.table.tableHighlight.style,t=this.context.table.tableUnHighlight.style;e.width="1em",e.height="1em",t.width="5em",t.height="5em",this.util.changeTxt(this.context.table.tableDisplay,"1 x 1"),this.submenuOff()},init:function(){const e=this.context.table;e._tdElement&&this.util.removeClass(e._tdElement,"sun-editor-selected-cell"),e._element=null,e._tdElement=null,e._trElement=null,e._trElements=0,e._tdIndex=0,e._trIndex=0,e._trCnt=0,e._tdCnt=0,e._tableXY=[],e._resizeBars=[]},call_controller_tableEdit:function(e){const t=this.context.table.resizeDiv;this.plugins.table.setPositionControllerDiv.call(this,e,!1),t.style.display="block",this.controllerArray=[t],this.controllerFunction=[this.plugins.table.init.bind(this)]},setPositionControllerDiv:function(e,t){const i=this.context.table,n=i.resizeDiv;let o=i._element;if(!o){for(o=e;!/^TABLE$/i.test(o.nodeName);)o=o.parentNode;i._element=o}i._tdElement!==e&&(i._tdElement&&this.util.removeClass(i._tdElement,"sun-editor-selected-cell"),this.util.addClass(e,"sun-editor-selected-cell"),i._tdElement=e,i._trElement=e.parentNode),(t||0===i._trCnt)&&(i._trElements=o.rows,i._tdIndex=e.cellIndex,i._trIndex=i._trElement.rowIndex,i._trCnt=o.rows.length,i._tdCnt=i._trElement.cells.length);const l=this.util.getOffset(e);n.style.left=l.left+"px",n.style.top=l.top+e.offsetHeight+12+"px"},insertRowCell:function(e,t){const i=this.context.table;if("row"===e){const e="up"===t?i._trIndex:i._trIndex+1;let n="";for(let e=0,t=i._tdCnt;e

";i._element.insertRow(e).innerHTML=n}else{const e=i._trElements,n="left"===t?i._tdIndex:i._tdIndex+1;let o=null;for(let t=0,l=i._trCnt;t"}this.plugins.table.setPositionControllerDiv.call(this,i._tdElement,!0)},deleteRowCell:function(e){const t=this.context.table;if("row"===e)t._element.deleteRow(t._trIndex);else{const e=t._trElements,i=t._tdIndex;for(let n=0,o=t._trCnt;n'+e.toolbar.alignLeft+'
  • ",t},pickup:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,i=null;for(;!i&&!/UL/i.test(t.tagName);)i=t.getAttribute("data-command"),t=t.parentNode;this.focus(),this.execCommand(i,!1,null),this.submenuOff()}}},WUQj:function(e,t,i){},WzUB:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_exports__.a={name:"formatBlock",add:function(core,targetElement){let listDiv=eval(this.setSubmenu(core.lang));listDiv.getElementsByTagName("UL")[0].addEventListener("click",this.pickUp.bind(core)),targetElement.parentNode.appendChild(listDiv),listDiv=null},setSubmenu:function(e){const t=document.createElement("DIV");return t.className="layer_editor layer_block",t.style.display="none",t.innerHTML='
    ",t},pickUp:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,i=null,n=null;for(;!i&&!/UL/i.test(t.tagName);)i=t.getAttribute("data-command"),n=t.getAttribute("data-value"),t=t.parentNode;if("range"===i){const e=document.createElement(n);this.wrapToTags(e),this.setRange(e.firstChild,0,e.firstChild,0),this.appendP(e)}else this.execCommand("formatBlock",!1,n),this.util.changeTxt(this.commandMap.FORMAT,n);this.submenuOff(),this.focus()}}},XJR1:function(e,t,i){"use strict";i.r(t);i("3FqI"),i("WUQj");var n=i("WRt5"),o=i("50IV"),l=i("MIhV"),s=i("0A7J"),a=i("s0fJ"),r=i("g4XY"),d=i("gMuy"),c=i("VquE"),u=i("WzUB"),m=i("Rp48"),g=i("KKur"),h=i("hlhS"),p={align:n.a,font:o.a,fontSize:l.a,fontColor:s.a,hiliteColor:a.a,horizontalRule:r.a,list:d.a,table:c.a,formatBlock:u.a,link:m.a,image:g.a,video:h.a};var _={getXMLHttpRequest:function(){if(!window.ActiveXObject)return window.XMLHttpRequest?new XMLHttpRequest:null;try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return null}}},copyObj:function(e){const t={};for(let i in e)t[i]=e[i];return t},getIncludePath:function(e,t){let i="";const n=[],o="js"===t?"script":"link",l="js"===t?"src":"href";let s="(?:";for(let t=0,i=e.length;t0?n[0][l]:""),-1===i.indexOf(":/")&&"//"!==i.slice(0,2)&&(i=0===i.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+i:location.href.match(/^[^\?]*\/(?:)/)[0]+i),!i)throw"[SUNEDITOR.util.getIncludePath.fail] The SUNEDITOR installation path could not be automatically detected. (name: +"+name+", extension: "+t+")";return i},convertContentsForEditor:function(e){let t,i,n="";e=e.trim();for(let o=0,l=(t=document.createRange().createContextualFragment(e).childNodes).length;o0&&(n+="

    "+t+"

    ")}else n+=i;const o={"&":"&"," ":" ","'":""","<":"<",">":">"};return e=e.replace(/&|\u00A0|'|<|>/g,function(e){return"string"==typeof o[e]?o[e]:e}),0===n.length&&(n="

    "+(e.length>0?e:"")+"

    "),n},isWysiwygDiv:function(e){return!(!e||1!==e.nodeType||!this.hasClass(e,"sun-editor-id-wysiwyg"))},isFormatElement:function(e){return!(!e||1!==e.nodeType||!/^(?:P|DIV|H[1-6]|LI)$/i.test(e.nodeName)||/sun-editor-id-media-container/.test(e.className))},isRangeFormatElement:function(e){return!(!e||1!==e.nodeType||!/^(?:BLOCKQUOTE|TABLE|TBODY|THEAD|TFOOT|TR|TD|OL|UL|PRE)$/i.test(e.nodeName))},getFormatElement:function(e){if(!e)return null;for(;!this.isFormatElement(e)&&!this.isWysiwygDiv(e.parentNode);)e=e.parentNode;if(this.isWysiwygDiv(e)||this.isRangeFormatElement(e)){return this.getListChildren(e,function(e){return this.isFormatElement(e)}.bind(this))[0]}return e},getRangeFormatElement:function(e){if(!e)return null;for(;!this.isRangeFormatElement(e)&&!this.isWysiwygDiv(e);)e=e.parentNode;return this.isWysiwygDiv(e)?null:e},getArrayIndex:function(e,t){let i=-1;for(let n=0,o=e.length;n0){for(let t=0;t0){for(let e=0;e":i)},focus:function(){if("none"===e.element.wysiwyg.style.display)return;const i=t.getParentElement(this.getSelectionNode(),"figcaption");i?i.focus():e.element.wysiwyg.focus(),this._setEditorRange(),l._findButtonEffectTag()},_setEditorRange:function(){const e=window.getSelection();let t=null;t=e.rangeCount>0?e.getRangeAt(0):this._createDefaultRange(),this._variable.range=t,t.collapsed?this.setSelectionNode(t.commonAncestorContainer):this.setSelectionNode(e.extentNode||e.anchorNode)},_createDefaultRange:function(){const t=document.createRange();return t.setStart(e.element.wysiwyg.firstChild,0),t.setEnd(e.element.wysiwyg.firstChild,0),t},setRange:function(e,t,i,n){const o=document.createRange();o.setStart(e,t),o.setEnd(i,n);const l=window.getSelection();l.rangeCount>0&&l.removeAllRanges(),this._variable.range=o,l.addRange(o)},getRange:function(){return this._variable.range||this._createDefaultRange()},setSelectionNode:function(e){this._variable.selectionNode=e},getSelectionNode:function(){return this._variable.selectionNode?this._variable.selectionNode:e.element.wysiwyg.firstChild},getSelectedFormatElements:function(){const e=this.getRange(),i=e.startContainer,n=e.endContainer,o=e.commonAncestorContainer,l=[];if(!t.isWysiwygDiv(o)&&!t.isRangeFormatElement(o))return[t.getFormatElement(o)];const s=t.getListChildren(o,function(e){return t.isFormatElement(e)});if(i===n)return s[0];let a=t.getFormatElement(i),r=t.getFormatElement(n),d=0,c=0;for(let e=0,t=s.length;e=0;e--)d[e]===t.parentNode&&d[e].firstChild===t&&0===n&&(c=e,t=t.parentNode);for(let e=u-1,t=o;e>c;e--)d[e]===t.parentNode&&1===d[e].nodeType&&(d.splice(e,1),t=t.parentNode,--u);for(let e=c;e<=u;e++){const s=d[e];0===s.length||3===s.nodeType&&void 0===s.data?t.removeItem(s):s!==i?s!==o?t.removeItem(s):(r=1===o.nodeType?document.createTextNode(o.textContent):document.createTextNode(o.substringData(l,o.length-l))).length>0?o.data=r.data:t.removeItem(o):(a=1===i.nodeType?document.createTextNode(i.textContent):document.createTextNode(i.substringData(0,n))).length>0?i.data=a.data:t.removeItem(i)}},wrapToTags:function(e){const i=this.getRange(),n=this.getSelectedFormatElements();let o,l,s,a=n[n.length-1];o=t.isRangeFormatElement(a)||t.isFormatElement(a)?a:t.getRangeFormatElement(a)||t.getFormatElement(a),/^TD$/i.test(a.nodeName)&&(a=t.getFormatElement(a)),l=o.nextSibling,s=o.parentNode;let r=null,d=null,c="";for(let t=0,i=n.length;t0&&(t=e.style.cssText.replace(c,"").trim()),t.length>0&&(e.style.cssText.length>0&&(e.style.cssText=t),!0)};if(o===s){if(!(d=e.cloneNode(!1)))return;if(n.collapsed){if(d.innerHTML="",t.isFormatElement(o))o.appendChild(d);else{const e=3===o.nodeType?o.parentNode:o,t=3===r.nodeType?r.splitText(a):null;e.insertBefore(d,t)}u.container=d,u.offset=1,m.container=d,m.offset=1}else{if(1===o.nodeType)d.innerHTML=g(o)?o.outerHTML:o.innerHTML,o.parentNode.appendChild(d),t.removeItem(o);else{const e=document.createTextNode(o.substringData(0,l)),i=document.createTextNode(o.substringData(a,o.length-a)),n=o.parentNode;d.innerText=o.substringData(l,a-l),0!==e.data.length||0!==i.data.length||g(n)||t.isFormatElement(n)?(n.insertBefore(d,o.nextSibling),e.data.length>0?o.data=e.data:o.data=o.substringData(0,l),i.data.length>0&&n.insertBefore(i,d.nextSibling)):(n.parentNode.insertBefore(d,n.nextSibling),t.removeItem(n))}u.container=d,u.offset=0,m.container=d,m.offset=1}}else if(t.isWysiwygDiv(r)||t.isRangeFormatElement(r)){const t=this.getSelectedFormatElements(),i=t.length-1;d=e.cloneNode(!1),u=this._wrapLineNodesStart(t[0],d,g,o,l);for(let n=1;n0?(d=e.cloneNode(!1),m=this._wrapLineNodesEnd(t[i],d,g,s,a)):m=u}else{d=e.cloneNode(!1);const i=this._wrapLineNodesOneLine(t.getFormatElement(r),d,g,o,l,s,a);u.container=i.startContainer,u.offset=i.startOffset,m.container=i.endContainer,m.offset=i.endOffset}this.setRange(u.container,u.offset,m.container,m.offset)},_wrapLineNodesOneLine:function(e,i,n,o,l,s,a){const r=e,d=e.cloneNode(!1);let c,u,m,g,h=o,p=l,_=s,f=a,b=!1,v=!1;function y(e){const t=new RegExp("(?:;|^|\\s)(?:"+g+"null)\\s*:[^;]*\\s*(?:;|$)","ig");let i="";return t&&e.style.cssText.length>0&&(i=t.test(e.style.cssText)),!i}return function e(t,o){const l=t.childNodes;for(let t=0,s=l.length;t0&&""!==s.textContent||/^BR$/i.test(s.nodeName)){let t;if(s===h){const e=document.createTextNode(h.substringData(0,p)),t=document.createTextNode(h.substringData(p,h.length-p));for(e.data.length>0&&o.appendChild(e),u=s,c=[],g="";u!==d&&u!==r&&null!==u;)n(u)&&1===u.nodeType&&y(u)&&(c.push(u.cloneNode(!1)),g+=u.style.cssText.substr(0,u.style.cssText.indexOf(":"))+"|"),u=u.parentNode;const l=c.pop()||t;for(m=u=l;c.length>0;)u=c.pop(),m.appendChild(u),m=u;i.appendChild(l),d.appendChild(i),h=t,p=0,b=!0,u!==t&&u.appendChild(h);continue}if(s===_){const e=document.createTextNode(_.substringData(f,_.length-f)),l=document.createTextNode(_.substringData(0,f));if(e.data.length>0){for(u=s,g="",c=[];u!==d&&u!==r&&null!==u;)1===u.nodeType&&y(u)&&(c.push(u.cloneNode(!1)),g+=u.style.cssText.substr(0,u.style.cssText.indexOf(":"))+"|"),u=u.parentNode;for(t=m=u=c.pop()||e;c.length>0;)u=c.pop(),m.appendChild(u),m=u;d.appendChild(t),u.textContent=e.data}for(u=o,c=[],g="";u!==d&&u!==r&&null!==u;)n(u)&&1===u.nodeType&&y(u)&&(c.push(u.cloneNode(!1)),g+=u.style.cssText.substr(0,u.style.cssText.indexOf(":"))+"|"),u=u.parentNode;const a=c.pop()||l;for(m=u=a;c.length>0;)u=c.pop(),m.appendChild(u),m=u;i.appendChild(a),_=l,f=l.data.length,v=!0,u!==l&&u.appendChild(_);continue}if(b){if(1===s.nodeType){e(s,s);continue}for(u=s,c=[],g="";null!==u.parentNode&&u!==r&&u!==i;)1===u.nodeType&&(v||n(u))&&y(u)&&(c.push(u.cloneNode(!1)),g+=u.style.cssText.substr(0,u.style.cssText.indexOf(":"))+"|"),u=u.parentNode;const t=c.pop()||s;for(m=u=t;c.length>0;)u=c.pop(),m.appendChild(u),m=u;t===s?o=v?d:i:v?(d.appendChild(t),o=u):(i.appendChild(t),o=u)}t=s.cloneNode(!1),o.appendChild(t),1===s.nodeType&&(a=t)}e(s,a)}}(e,d),t.removeEmptyNode(d),e.parentNode.insertBefore(d,e),t.removeItem(e),{startContainer:h,startOffset:p,endContainer:_,endOffset:f}},_wrapLineNodes:function(e,t,i){!function e(t,n){const o=t.childNodes;for(let t=0,l=o.length;t0&&""!==l.textContent||/^BR$/i.test(l.nodeName))){let e=l.cloneNode(!1);n.appendChild(e),1===l.nodeType&&(s=e)}e(l,s)}}(e,t),e.innerHTML="",e.appendChild(t)},_wrapLineNodesStart:function(e,i,n,o,l){const s=e,a=e.cloneNode(!1);let r,d,c,u=o,m=l,g=!1;return function e(t,o){const l=t.childNodes;for(let t=0,h=l.length;t0){const e=r.pop();for(c=d=e;r.length>0;)d=r.pop(),c.appendChild(d),c=d;i.appendChild(e),o=d}else o=i}if(g||h!==u){if((!g||n(h))&&(h.textContent.length>0&&""!==h.textContent||/^BR$/i.test(h.nodeName))){const e=h.cloneNode(!1);o.appendChild(e),1===h.nodeType&&(p=e)}e(h,p)}else{const e=document.createTextNode(u.substringData(0,m)),t=document.createTextNode(u.substringData(m,u.length-m));for(e.data.length>0&&o.appendChild(e),d=o,r=[];d!==a&&null!==d;)1===d.nodeType&&n(d)&&r.push(d.cloneNode(!1)),d=d.parentNode;const l=r.pop()||o;for(c=d=l;r.length>0;)d=r.pop(),c.appendChild(d),c=d;l!==o?(i.appendChild(l),o=d):o=i,a.appendChild(i),u=t,m=0,g=!0,o.appendChild(u)}}}(e,a),e.parentNode.insertBefore(a,e),t.removeItem(e),{container:u,offset:m}},_wrapLineNodesEnd:function(e,i,n,o,l){const s=e,a=e.cloneNode(!1);let r,d,c,u=o,m=l,g=!1;return function e(t,o){const l=t.childNodes;for(let t=l.length-1;0<=t;t--){const h=l[t];let p=o;if(g&&!/^BR$/i.test(h.nodeName)){if(1===h.nodeType){e(h,h);continue}for(d=h,r=[];null!==d.parentNode&&d!==s&&d!==i;)n(d)&&1===d.nodeType&&r.push(d.cloneNode(!1)),d=d.parentNode;if(r.length>0){const e=r.pop();for(c=d=e;r.length>0;)d=r.pop(),c.appendChild(d),c=d;i.insertBefore(e,i.firstChild),o=d}else o=i}if(g||h!==u){if((!g||n(h))&&(h.textContent.length>0&&""!==h.textContent||/^BR$/i.test(h.nodeName))){const e=h.cloneNode(!1);o.insertBefore(e,o.firstChild),1===h.nodeType&&(p=e)}e(h,p)}else{const e=document.createTextNode(u.substringData(m,u.length-m)),t=document.createTextNode(u.substringData(0,m));for(e.data.length>0&&o.insertBefore(e,o.firstChild),d=o,r=[];d!==a&&null!==d;)n(d)&&1===d.nodeType&&r.push(d.cloneNode(!1)),d=d.parentNode;const l=r.pop()||o;for(c=d=l;r.length>0;)d=r.pop(),c.appendChild(d),c=d;l!==o?(i.insertBefore(l,i.firstChild),o=d):o=i,a.insertBefore(i,a.firstChild),u=t,m=t.data.length,g=!0,o.insertBefore(u,o.firstChild)}}}(e,a),e.parentNode.insertBefore(a,e),t.removeItem(e),{container:u,offset:m}},commandHandler:function(i,n){switch(n){case"codeView":this.toggleCodeView(),t.toggleClass(i,"on");break;case"fullScreen":this.toggleFullScreen(i),t.toggleClass(i,"on");break;case"indent":case"outdent":this.indent(n);break;case"redo":case"undo":case"removeFormat":this.execCommand(n,!1,null);break;case"preview":case"print":this.openWindowContents(n);break;case"showBlocks":this.toggleDisplayBlocks(),t.toggleClass(i,"on");break;case"subscript":t.hasClass(e.tool.superscript,"on")&&(this.execCommand("superscript",!1,null),t.removeClass(e.tool.superscript,"on")),this.execCommand(n,!1,null),t.toggleClass(i,"on");break;case"superscript":t.hasClass(e.tool.subscript,"on")&&(this.execCommand("subscript",!1,null),t.removeClass(e.tool.subscript,"on")),this.execCommand(n,!1,null),t.toggleClass(i,"on");break;default:this.execCommand(n,!1,i.getAttribute("data-value")),t.toggleClass(i,"on")}},indent:function(e){const t=this.getSelectedFormatElements();let i,n;for(let o=0,l=t.length;o(?=[^\n])/gi,"

    \n"),e.element.wysiwyg.style.display="none",e.element.code.style.display="block",this._variable.wysiwygActive=!1,e.element.code.focus();else{const i=e.element.code.value.trim();e.element.wysiwyg.innerHTML=i.length>0?t.convertContentsForEditor(i):"

    

    ",e.element.wysiwyg.scrollTop=0,e.element.code.style.display="none",e.element.wysiwyg.style.display="block",this._variable.wysiwygActive=!0,this.focus()}},toggleFullScreen:function(i){this._variable.isFullScreen?(e.element.topArea.style.cssText=this._variable.originCssText,e.element.editorArea.style.height=this._variable.editorHeight+"px",t.removeClass(i.firstElementChild,"icon-reduction"),t.addClass(i.firstElementChild,"icon-expansion")):(e.element.topArea.style.position="fixed",e.element.topArea.style.top="0",e.element.topArea.style.left="0",e.element.topArea.style.width="100%",e.element.topArea.style.height="100%",e.element.topArea.style.zIndex="2147483647",this._variable.innerHeight_fullScreen=window.innerHeight-e.tool.bar.offsetHeight,e.element.editorArea.style.height=this._variable.innerHeight_fullScreen+"px",t.removeClass(i.firstElementChild,"icon-expansion"),t.addClass(i.firstElementChild,"icon-reduction")),this._variable.isFullScreen=!this._variable.isFullScreen},openWindowContents:function(i){const o="print"===i,l=window.open("","_blank");l.mimeType="text/html",l.document.write(''+(o?n.toolbar.print:n.toolbar.preview)+'
    '+e.element.wysiwyg.innerHTML+"
    "+(o?"