@syncfusion/ej2-richtexteditor
Version:
Essential JS 2 RichTextEditor component
1 lines • 1.44 MB
JavaScript
this.ej=this.ej||{},this.ej.richtexteditor=function(e,t,n,i,o,r,s,a,l,d,c){"use strict";function p(e,t,n){for(var i=0;t.length>i;i++)if(t[i].value===n.subCommand)return e.localeObj.getConstant(t[i].locale);return n.text}function h(e){vt.forEach(function(t,n){vt[n].text=p(e,bt,vt[n])}),Ot.forEach(function(t,n){Ot[n].text=p(e,Et,Ot[n])}),Lt.forEach(function(t,n){Lt[n].text=p(e,St,Lt[n])}),kt.forEach(function(t,n){kt[n].text=p(e,Tt,kt[n])}),Bt.forEach(function(t,n){Bt[n].text=p(e,Dt,Bt[n])}),Mt.forEach(function(t,n){Mt[n].text=p(e,At,Mt[n])}),Rt.forEach(function(t,n){Rt[n].text=p(e,It,Rt[n])}),lt.forEach(function(t,n){lt[n].text=p(e,Pt,lt[n])}),ft.forEach(function(t,n){ft[n].text=p(e,gt,ft[n])}),wt.forEach(function(t,n){wt[n].text=p(e,xt,wt[n])})}function u(){var e=!1;return t.Browser.isDevice&&t.Browser.isIos&&(e=!0),e}function m(e,n){if("BODY"===e.nodeName&&!t.isNullOrUndefined(n)){var i=top.window.document.querySelector(n);t.isNullOrUndefined(i)||i.contentWindow.focus()}}function f(e,n){var i=document.createElement("div");i.innerHTML=e;for(var o=i.querySelectorAll("table"),r=0;r<o.length;r++)if(o[r].classList.length>0&&!o[r].classList.contains("e-rte-table")&&!o[r].classList.contains("e-rte-custom-table")){if(o[r].classList.add("e-rte-paste-table"),o[r].classList.contains("e-rte-paste-word-table")){o[r].classList.remove("e-rte-paste-word-table");continue}if(o[r].classList.contains("e-rte-paste-excel-table")){o[r].classList.remove("e-rte-paste-excel-table"),"0"===o[r].getAttribute("border")&&o[r].removeAttribute("border");for(var s=o[r].querySelectorAll("td"),a=0;a<s.length;a++)"none"===s[a].style.borderLeft&&s[a].style.removeProperty("border-left"),"none"===s[a].style.borderRight&&s[a].style.removeProperty("border-right"),"none"===s[a].style.borderBottom&&s[a].style.removeProperty("border-bottom"),"none"===s[a].style.borderTop&&s[a].style.removeProperty("border-top"),"none"===s[a].style.border&&s[a].style.removeProperty("border")}else{if(o[r].classList.contains("e-rte-paste-onenote-table")){o[r].classList.remove("e-rte-paste-onenote-table");continue}if(o[r].classList.contains("e-rte-paste-html-table")){var l=o[r];if(l.classList.remove("e-rte-paste-html-table"),!l.classList.contains("e-rte-table-border")){var d=l.querySelectorAll("td, th"),c=l.getAttribute("style"),p=c&&c.includes("border");if(!p)for(var h=0,u=Array.from(d);h<u.length;h++){var m=u[h].getAttribute("style");if(m&&m.includes("border")){p=!0;break}}p||(l.classList.add("e-rte-table"),l.classList.remove("e-rte-paste-table"))}continue}}}for(var f=i.querySelectorAll("img"),r=0;r<f.length;r++){var v=f[r];if(!v.classList.contains("e-rte-image-unsupported"))if(v.classList.contains("e-rte-image")||v.classList.add("e-rte-image"),n)v.classList.contains("e-imginline")||v.classList.contains("e-imgbreak")||v.classList.add("e-imginline");else{var C=t.closest(v,".e-img-caption")||t.closest(v,".e-rte-img-caption")||t.closest(v,".e-caption-inline");C?g(C,v,Nn):b(v,Nn)}}return i.innerHTML}function g(e,n,i){t.removeClass([e],"e-img-caption"),t.removeClass([e],"e-rte-img-caption"),t.removeClass([e],"e-caption-inline"),e.classList.add("e-img-caption-container"),e.style.width=""===n.style.width?"auto":n.style.width;var o=e.querySelector(".e-img-inner");t.removeClass([o],"e-img-inner"),t.addClass([o],"e-img-caption-text");for(var r=0,s=Object.keys(i);r<s.length;r++){d=s[r];e.classList.contains(d)&&t.removeClass([e],d)}for(var a=0,l=Object.keys(i);a<l.length;a++){var d=l[a];if(n.classList.contains(d)){t.removeClass([n],d),e.classList.add(i[d]);break}}}function b(e,n){for(var i=0,o=Object.keys(n);i<o.length;i++){var r=o[i];if(e.classList.contains(r)){t.removeClass([e],r),e.classList.add(n[r]);break}}t.isNullOrUndefined(e.closest(".e-img-caption-container"))&&(["e-img-inline","e-img-break","e-img-left","e-img-right","e-img-center","e-img-left-wrap","e-img-right-wrap"].some(function(t){return e.classList.contains(t)})||e.classList.add("e-img-inline"))}function v(e){var t=e;do{t.childNodes.length>0&&(t=t.childNodes[0])}while(t.childNodes.length>0);return t}function C(){return{bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,unorderedlist:!1,numberFormatList:!1,bulletFormatList:!1,underline:!1,alignments:null,lineHeight:null,backgroundcolor:null,fontcolor:null,fontname:null,fontsize:null,formats:null,createlink:!1,insertcode:!1,blockquote:!1,inlinecode:!1,isCodeBlock:!1,isCheckList:!1}}function y(){return{bold:!1,italic:!1,subscript:!1,superscript:!1,strikethrough:!1,orderedlist:!1,uppercase:!1,lowercase:!1,inlinecode:!1,unorderedlist:!1,formats:null}}function N(e,t){if(void 0===t&&(t=null),!e)return!1;var n=e.nodeName.toUpperCase();if(-1!==["TABLE","IMG","VIDEO","AUDIO"].indexOf(n))return!1;if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("style"))return!0;t||(t=new dn);for(var i=0,o=["bold","italic","underline","strikethrough","superscript","subscript","fontcolor","fontname","fontsize","backgroundcolor","inlinecode"];i<o.length;i++){var r=o[i];if(t.isFormattedNode(e,r))return!0}for(var s=0;s<e.childNodes.length;s++)if(N(e.childNodes[s],t))return!0;return!1}function E(e,n){if(null!==e.startContainer.parentElement.closest("ol,ul")&&null!==e.endContainer.parentElement.closest("ol,ul")){e.extractContents();var i=("#text"===e.startContainer.nodeName?e.startContainer.parentElement:e.startContainer).querySelectorAll("li");i.length>0&&i.forEach(function(e){t.isNullOrUndefined(e.firstChild)||"OL"!==e.firstChild.nodeName&&"UL"!==e.firstChild.nodeName||(e.style.listStyleType="none"),""===e.innerHTML.trim()&&e!==n&&e.remove();var i="LI"===n.nodeName?n:t.closest(n,"li");""===e.textContent.trim()&&e!==i&&e.remove()})}}function S(e,n){var i="BODY"===n.nodeName?n.ownerDocument.defaultView.frameElement.closest(".e-richtexteditor"):n.closest(".e-richtexteditor"),o=i.style.height;if(0!==e.getSelection().rangeCount){var r=e.getSelection().getRangeAt(0),s="#text"===r.startContainer.nodeName?r.startContainer.parentElement:r.startContainer,a=s.getBoundingClientRect(),l=a.top,d=a.bottom,c=i.getBoundingClientRect(),p=i.querySelectorAll(".e-count-enabled, .e-resize-enabled").length>0;"BODY"===n.nodeName?"auto"===o?window.innerHeight<l?s.scrollIntoView({block:"end",inline:"nearest"}):d>s.getBoundingClientRect().top&&s.scrollIntoView({block:"nearest",inline:"nearest"}):((l>n.getBoundingClientRect().height||d>c.bottom)&&s.scrollIntoView({block:"nearest",inline:"nearest"}),d>s.getBoundingClientRect().top&&s.scrollIntoView({block:"nearest",inline:"nearest"})):"auto"===o?(window.innerHeight<l&&s.scrollIntoView({block:"end",inline:"nearest"}),l>s.getBoundingClientRect().top&&s.scrollIntoView({block:"nearest",inline:"nearest"})):(d>s.getBoundingClientRect().top&&s.scrollIntoView({block:"nearest",inline:"nearest"}),d>c.bottom&&(i.querySelector(".e-rte-content").scrollTop+=d-c.bottom+(p?20:0)));var h=n.closest('div[style*="overflow-y: scroll"]');if(!t.isNullOrUndefined(h)){var u=h.getBoundingClientRect();d>u.bottom&&(h.scrollTop+=d-u.bottom)}}}function T(e,t,n){for(var i=0;i<t.length;i++)0===i?e.splice(n+i,1,t[i]):e.splice(n+i,0,t[i]);return e}function O(e,n){t.removeClass(e,n);for(var i=0;i<e.length;i++)0===e[i].classList.length&&e[i].hasAttribute("class")&&e[i].removeAttribute("class");return e}function L(e){for(var t=[],n=e.rows,i=0;i<=n.length-1;i++)for(var o=n[i],r=0,s=0;s<=o.children.length-1;s++){var a=o.children[s],l=parseInt(a.getAttribute("colspan"),10)||1;r=k(t,a,i,r,l,parseInt(a.getAttribute("rowspan"),10)||1),r+=l}return t}function k(e,t,n,i,o,r){for(var s=n;s<n+r;s++){e[s]||(e[s]=[]);for(var a=i;a<i+o;a++)e[s][a]?i++:e[s][a]=t}return i}function w(e,t){for(var n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++)if(t[n][i]===e)return[n,i];return[]}function x(e,n){if(void 0===n&&(n=!1),e&&(!D(e)||n)){for(var i=B(e),o=new Array(i),r=t.createElement("colgroup"),s=new Map,a=0;a<e.rows.length;a++)for(var l=0,d=0;d<e.rows[a].cells.length;d++){for(var c=1;c<e.rows[a].cells[d].rowSpan;c++){var p=""+(a+c)+l;s.set(p,e.rows[a].cells[d])}(b=A(s,a,d))>l&&(l=b);var h=e.rows[a].cells[d].offsetWidth;(!o[l]||h<o[l])&&(o[l]=h),l+=1+e.rows[a].cells[d].colSpan-1}for(var u=0;u<o.length;u++)(v=t.createElement("col")).appendChild(t.createElement("br")),v.style.width=M(o[u],parseInt(getComputedStyle(e).width,10))+"%",r.appendChild(v);if(n){var m=D(e);m&&t.detach(m)}e.insertBefore(r,e.firstChild);for(var f=0;f<e.rows.length;f++)for(var g=e.rows[f],b=0;b<g.cells.length;b++){var v=g.cells[b];v.style.width=""}(t.isNullOrUndefined(e.style.width)||""===e.style.width)&&(e.style.width=e.offsetWidth+"px")}}function D(e){return e&&e.children?Array.from(e.children).find(function(e){return"COLGROUP"===e.tagName})||null:null}function B(e){if(!e||!e.rows||0===e.rows.length)return 0;for(var t=e.rows[0].cells,n=0,i=0;i<t.length;i++)n+=t[i].colSpan;return n}function A(e,t,n){var i=""+t+n,o=e.get(i);return o?A(e,t,n+o.colSpan):n}function M(e,t){return 0===t?0:e/t*100}function I(e,t){if(t&&"HTML"===t&&e){var n=document.createElement("div");n.innerHTML=e.trim(),n.querySelectorAll(".e-img-inner").forEach(function(e){e.setAttribute("contenteditable","true")}),n.querySelectorAll(".e-img-caption-text").forEach(function(e){e.setAttribute("contenteditable","true")}),e=n.innerHTML,n.remove()}return e}function R(e,n){if(e&&n){var i=document.createElement("div");if("HTML"===n){i.innerHTML=e,i.querySelectorAll(".e-img-inner").forEach(function(e){e.setAttribute("contenteditable","false")}),i.querySelectorAll(".e-img-caption-text").forEach(function(e){e.setAttribute("contenteditable","false")});var o=i.querySelectorAll(".e-column-resize, .e-row-resize, .e-table-box, .e-table-rhelper, .e-img-resize, .e-vid-resize, .e-tb-row-insert, .e-tb-col-insert, .e-table-wrapper , .e-row-wrapper, .e-col-wrapper");if(o.length>0)for(var r=0;r<o.length;r++)t.detach(o[r]);P(i)}else i.textContent=e;return"Markdown"===n?i.innerHTML.replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"):i.innerHTML}return e}function P(e){for(var n=[Gt,Xt,$t,Yt,Zt,Jt,tn,en],i=0;i<n.length;i++){var o=e.querySelectorAll("."+n[i]);if(t.removeClass(o,n[i]),0!==o.length)for(var r=0;r<o.length;r++)0===o[r].classList.length&&o[r].removeAttribute("class"),"IMG"!==o[r].nodeName&&"VIDEO"!==o[r].nodeName||""===o[r].style.outline||(o[r].style.outline="")}e.querySelectorAll('[class=""]').forEach(function(e){e.removeAttribute("class")})}function U(e,n,i,o){if(i||"br"===n.toLowerCase()||t.isNullOrUndefined(e))return e;var r=document.createElement("div");r.innerHTML=e;var s,a=["div","p"],l=n.toLowerCase(),d=a.indexOf(l)>=0?l:"div";if(o){s=new Set;for(var c=0,p=Array.from(r.childNodes);c<p.length;c++){var h=p[c];if(h.nodeType===Node.ELEMENT_NODE&&V(h))break;h.nodeType!==Node.ELEMENT_NODE&&h.nodeType!==Node.TEXT_NODE||s.add(h)}}F(r,d,s);var u=r.innerHTML;return r.remove(),u}function H(e,t){for(var n=e.values(),i=n.next();!i.done;){if(i.value===t)return!0;i=n.next()}return!1}function F(e,t,n){for(var i=new Set(["DIV","TH","TD","LI","BLOCKQUOTE","OL","UL","TABLE","TBODY","TR","THEAD","TFOOT"]),o=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","IMG","LABEL","IFRAME","VIDEO","AUDIO","OBJECT","EMBED","CANVAS","METER","PROGRESS","OBJECT"]),r=new Set(["BASE","AREA","LINK"]),s=null,a=0,l=Array.from(e.childNodes);a<l.length;a++)!function(a){var l=!0;if(a.parentElement&&"LI"===a.parentElement.nodeName&&(l=_(a.parentElement)),a.nodeType===Node.TEXT_NODE){if(n&&n.has(a))return"continue";a.nodeValue&&a.nodeValue.trim()&&l&&(s||(s=document.createElement(t),e.insertBefore(s,a)),s.appendChild(a))}else if(a.nodeType===Node.ELEMENT_NODE){h=(p=a).tagName.toUpperCase();if(V(p)&&!H(o,h)){s=null;var d=Array.from(p.childNodes),c=!1;d.forEach(function(e){e.nodeType===Node.ELEMENT_NODE&&V(e)&&(c=!0)}),H(i,h)&&d.length>0&&c&&F(p,t,n)}else if(!V(p)&&!H(o,h)&&!r.has(h)&&"HR"!==h){if(n&&n.has(p))return"continue";a.parentNode&&l&&a.parentNode.childNodes.length>1&&(s||(s=document.createElement(t),e.insertBefore(s,a)),s.appendChild(a))}}if(a.nodeType===Node.ELEMENT_NODE){var p=a,h=p.tagName.toUpperCase();if(V(p))if(1===p.childNodes.length&&p.firstChild&&p.firstChild.nodeType===Node.ELEMENT_NODE&&"P"===p.firstChild.nodeName&&"DIV"!==p.nodeName&&1===p.firstChild.childNodes.length&&p.firstChild.firstChild&&p.firstChild.firstChild.nodeType!==Node.ELEMENT_NODE&&0===p.firstChild.attributes.length)p.replaceChild(p.firstChild.firstChild,p.firstChild);else if("P"===p.nodeName&&p.parentElement&&"LI"===p.parentElement.nodeName&&!l&&0===p.attributes.length){var u=void 0,m=q(p.nextSibling),f=j(p.previousSibling);if(m||f||(u=!0),u){for(;p.firstChild;)p.parentElement.insertBefore(p.firstChild,p);p.parentElement.removeChild(p)}}}}(l[a])}function q(e){for(;e;){if((e.nodeType!==Node.TEXT_NODE||""!==e.textContent.trim())&&"OL"!==e.nodeName&&"UL"!==e.nodeName)return e;e=e.nextSibling}return null}function j(e){for(;e;){if((e.nodeType!==Node.TEXT_NODE||""!==e.textContent.trim())&&"OL"!==e.nodeName&&"UL"!==e.nodeName)return e;e=e.previousSibling}return null}function _(e){var t=!1,n=!1;return e.childNodes.forEach(function(e){if(e.nodeType===Node.ELEMENT_NODE){var i=e.nodeName;if(V(e)&&"OL"!==i&&"UL"!==i)(s=(r=e.nextSibling)&&-1!==["UL","OL"].indexOf(r.nodeName))||(t=!0);else if(-1!==["OL","UL"].indexOf(i)){var o=e.previousSibling,r=e.nextSibling;o&&V(o)&&r&&r.nodeType===Node.TEXT_NODE&&r.textContent.trim().length>0&&(t=!0)}else if(!V(e)&&"LI"!==i){var s=(r=e.nextSibling)&&-1!==["UL","OL"].indexOf(r.nodeName);s||(n=!0)}}else e.nodeType===Node.TEXT_NODE&&e.textContent.trim().length>0&&(n=!0)}),t&&n}function V(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&fn.indexOf(e.tagName.toLowerCase())>=0}function z(e,t){function n(e){return"pre-line"===e.style.whiteSpace}function i(e){return"PRE"===e.tagName||("pre"===e.style.whiteSpace||"pre-wrap"===e.style.whiteSpace)}function o(e,t){if(void 0===t&&(t=!1),null!=e)for(var r=e.firstChild;null!=r;){var s=r.nodeType;if(3===s){var a=r.nodeValue;1===(a=t?a.replace(/[\t]/g," "):a.replace(/[\n\r\t]/g," ")).replace(/[ ]{2,}/g," ").length&&(a=a.replace(/[ ]{2,}/g," ")),r.nodeValue!==a&&(r.nodeValue=a);var l=a,d=l.length,c=r.parentElement,p=!(!c||1!==c.childNodes.length||c.firstChild.nodeType!==Node.TEXT_NODE||" "!==c.firstChild.nodeValue);if(d>0&&(" "===l||" "===l[0]||" "===l[d-1])&&!p){var h=" "===l,u=" "===l[0],m=" "===l[d-1],f=r.nextSibling,g=r.previousSibling;if(f&&V(f)&&h)r.nodeValue="";else if(g&&V(g)&&h)r.nodeValue="";else{for(var b=r,v=!1,C=!1,y=void 0;b&&!V(b);)b.previousSibling&&!C&&(C=!0),b.nextSibling&&!v&&(v=!0,y=b.nextSibling),b=b.parentElement;if(h&&(!C&&v?r.nodeValue="":C&&!v?r.nodeValue="":C&&v&&y&&3===y.nodeType&&""===y.textContent.trim()&&(r.nodeValue="")),u||m){var N=r.textContent;C||" "!==N[0]||(N=N.substring(1)),!v&&N.length>0&&" "===N[N.length-1]&&V(r.parentElement)&&(N=N.substring(0,N.length-1)),v&&y&&V(y)&&N.length>0&&" "===N[N.length-1]&&(N=N.substring(0,N.length-1)),r.textContent!==N&&(r.textContent=N)}}}}else 1===s&&(i(b=r)||n(b)||o(r,t),n(b)&&o(r,!0));r=r.nextSibling}}var r=!1;if("pre-wrap"===getComputedStyle(t).whiteSpace||"pre"===getComputedStyle(t).whiteSpace)return e;"pre-line"===getComputedStyle(t).whiteSpace&&(r=!0);var s=document.createElement("div");return s.innerHTML=e,o(s,r),s.innerHTML}function W(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],i=atob(t[1]),o=i.length,r=new Uint8Array(o);o--;)r[o]=i.charCodeAt(o);return new Blob([r],{type:n})}function Q(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function K(e){return G((new DOMParser).parseFromString(e,"text/html").body,0).trim()}function G(e,t){var n=new Set(["area","base","br","col","embed","hr","img","input","link","meta","source","track","wbr"]),i=" ".repeat(t),o="";return e.childNodes.forEach(function(e){if(e.nodeType===Node.TEXT_NODE){var r=e.textContent;r&&(r=r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),o+=r)}else if(e.nodeType===Node.ELEMENT_NODE){var s=e,a=s.tagName.toLowerCase(),l=Array.from(s.attributes).map(function(e){return e.name+'="'+Q(e.value)+'"'}).join(" "),d=l?" "+l:"",c=l?"<"+a+" "+l+">":"<"+a+">",p="</"+a+">",h=V(s);if(n.has(a))"col"===a?"\n"===o[o.length-1]?o+=i+"<"+a+d+">\n":o+="\n"+i+"<"+a+d+">\n":o+="<"+a+d+"/>";else if(h){"\n"===o[o.length-1]?o+=""+i+c:o+="\n"+i+c;var u=G(e,t+1);u&&(o+=""+u),"\n"===o[o.length-1]?o+=""+i+p+"\n":o+=p+"\n"}else o+=""+c+G(e,0)+p}}),o}function X(e,n){var i=e.ownerDocument.createElement("div"),o=[].slice.call(e.ownerDocument.getElementsByTagName("head")[0].querySelectorAll("base, link, style")),r=[].slice.call(e.ownerDocument.getElementsByTagName("body")[0].querySelectorAll("link, style"));if(r.length)for(var s=0,a=r.length;s<a;s++)o.push(r[parseInt(s.toString(),10)]);var l="";t.isNullOrUndefined(n)&&(n=window.open("","print","height=452,width=1024,tabbar=no")),i.appendChild(e.cloneNode(!0));for(var d=0,a=o.length;d<a;d++)l+=o[parseInt(d.toString(),10)].outerHTML;n.document.write("<!DOCTYPE html> <html><head>"+l+"</head><body>"+i.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),n.document.close(),n.focus();var c=setInterval(function(){n.ready&&(n.print(),n.close(),clearInterval(c))},500);return n}function Y(e,n){var i,o=["TD","TH","TABLE","A"],r=e.ownerDocument,s=t.closest(e,"#"+n+"_rte-edit-view");for(i=e.closest(".e-rte-checklist")?s||r.documentElement:(e.offsetParent&&(e.offsetParent.classList.contains("e-img-caption")||e.offsetParent.classList.contains("e-img-caption-container")||e.offsetParent.classList.contains("e-video-clickelem")||o.indexOf(e.offsetParent.tagName)>-1)?s:e.offsetParent)||r.documentElement;i&&(i===r.body||i===r.documentElement)&&"static"===i.style.position;)i=i.parentNode;return i}function $(e,t){var n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),o=t.ownerDocument,r=o.documentElement.scrollLeft||0,s=o.documentElement.scrollTop||0,a=t.scrollLeft||0,l=t.scrollTop||0;return{top:n.top+s-(i.top+s)+l,left:n.left+r-(i.left+r)+a}}function J(e,t,n){return-1===an.indexOf(t)&&-1===an.indexOf(n)||(t="px"),e*ln[t][n]}function Z(e,t){var n=-1;return t.some(function(t,i){return"string"==typeof t&&e===t.toLocaleLowerCase()&&(n=i,!0)}),n}function ee(e,t){var n=!1;return e.classList.contains(t)&&(n=!0),n}function te(e,n,i,o){var r,s;if(0===e.length&&"FontSize"===n)return"Font Size";for(var a=0;a<e.length;a++){if("value"===i&&e[a].value.toLocaleLowerCase()===n.toLocaleLowerCase()){r=e[a];break}if("text"===i&&e[a].text.toLocaleLowerCase()===n.toLocaleLowerCase()){r=e[a];break}if("subCommand"===i&&e[a].subCommand.toLocaleLowerCase()===n.toLocaleLowerCase()){r=e[a];break}}if(!t.isNullOrUndefined(r))switch(o){case"text":s=r.text;break;case"value":s=r.value;break;case"iconCss":s=r.iconCss}return s}function ne(e){return t.isNullOrUndefined(e)?"":e}function ie(e,t,n){return n?window.pageYOffset+t.getBoundingClientRect().top+e.clientY:e.pageY}function oe(e,t){var n=t.getService("rteLocale"),i=qt[""+e];return n.getConstant(i)}function re(e,n,i){Ee(i);for(var o=e.dropDownModule,r=e.args,s=0,a=Object.keys(e.args);s<a.length;s++)for(var l=a[s],d=0;d<e.tbItems.length;d++){var c=e.tbItems[d].subCommand,p=c&&c.toLocaleLowerCase();if(c&&p===l||"UL"===c&&"unorderedlist"===l||"OL"===c&&"orderedlist"===l||"CodeBlock"===c&&"isCodeBlock"===l||"Checklist"===c&&"isCheckList"===l||"pre"===p&&"insertcode"===l||"NumberFormatList"===c&&"numberFormatList"===l||"BulletFormatList"===c&&"bulletFormatList"===l)if("boolean"==typeof r[""+l])!0===r[""+l]?t.addClass([e.tbElements[d]],[Je]):t.removeClass([e.tbElements[d]],[Je]);else if(("string"==typeof r[""+l]||null===r[""+l])&&Z(l,e.parent.toolbarSettings.items)>=-1){var h=r[""+l]?r[""+l]:"",u="";switch(l){case"formats":if(t.isNullOrUndefined(o.formatDropDown)||!t.isNullOrUndefined(o.formatDropDown)&&o.formatDropDown.isDestroyed)break;var m=e.parent.format.types,f=t.isNullOrUndefined(e.parent.format.default)?m[0].text:e.parent.format.default;u="empty"===h?"":te(m,h,"subCommand","text"),o.formatDropDown.content='<span style="display: inline-flex;width:'+e.parent.format.width+'" ><span class="e-rte-dropdown-btn-text'+(t.isNullOrUndefined(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+(t.isNullOrUndefined(u)?f:u)+"</span></span>",o.formatDropDown.dataBind();break;case"alignments":if(t.isNullOrUndefined(o.alignDropDown)||!t.isNullOrUndefined(o.alignDropDown)&&o.alignDropDown.isDestroyed)break;u=te(vt,h,"subCommand","iconCss"),o.alignDropDown.iconCss=t.isNullOrUndefined(u)?"e-icons e-justify-left":u,o.alignDropDown.dataBind();break;case"fontname":if(t.isNullOrUndefined(o.fontNameDropDown)||!t.isNullOrUndefined(o.fontNameDropDown)&&o.fontNameDropDown.isDestroyed)break;var g=e.parent.fontFamily.items;u="empty"===h?"":te(g,h,"value","text");var b=t.isNullOrUndefined(e.parent.fontFamily.default)?0===g.length?i.serviceLocator.getService("rteLocale").getConstant("fontName"):g[0].text:e.parent.fontFamily.default,v="Default"===(t.isNullOrUndefined(u)?b:u)?i.serviceLocator.getService("rteLocale").getConstant("fontName"):t.isNullOrUndefined(u)?b:u,C='<span style="display: inline-flex;width:'+e.parent.fontFamily.width+'" ><span class="e-rte-dropdown-btn-text'+(t.isNullOrUndefined(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+v+"</span></span>";ae(o.fontNameDropDown,C);break;case"fontsize":if(t.isNullOrUndefined(o.fontSizeDropDown)||!t.isNullOrUndefined(o.fontSizeDropDown)&&o.fontSizeDropDown.isDestroyed)break;var y=e.parent.fontSize.items,N=t.isNullOrUndefined(e.parent.fontSize.default)?0===y.length?i.serviceLocator.getService("rteLocale").getConstant("fontSize"):y[0].text:e.parent.fontSize.default,E=te(y,""===h?N.replace(/\s/g,""):h,y.length>0&&y[0]&&N.replace(/\s/g,"")===y[0].text&&""===h?"text":"value","text");u="empty"===h?"":"Default"===E?i.serviceLocator.getService("rteLocale").getConstant("fontSize"):E;C='<span style="display: inline-flex;width:'+e.parent.fontSize.width+'" ><span class="e-rte-dropdown-btn-text'+(t.isNullOrUndefined(e.parent.cssClass)?"":" "+e.parent.cssClass)+'">'+ne(u)+"</span></span>";ae(o.fontSizeDropDown,C);break;case"bulletFormatList":case"numberFormatList":""!==h?t.addClass([e.tbElements[d]],[Je]):t.removeClass([e.tbElements[d]],[Je])}}}}function se(e){return"object"==typeof e?e:[e]}function ae(e,t){var n=t.match(/style="([^"]*)"/),i="";n&&(i=n[1]);var o=t.replace(/ style="([^"]*)"/,"");e.content=o,e.dataBind(),e.element.firstChild&&e.element.firstChild.setAttribute("style",i)}function le(e,n){for(var i=[],o=0;o<e.length;o++)for(var r=0;r<n.length;r++)if("Separator"!==n[r].type){if(("OrderedList"===e[o]||"NumberFormatList"===e[o])&&"OL"===n[r].subCommand){i.push(r);break}if(("UnorderedList"===e[o]||"BulletFormatList"===e[o])&&"UL"===n[r].subCommand){i.push(r);break}if("InsertCode"===e[o]&&"Pre"===n[r].subCommand){i.push(r);break}if("Blockquote"===e[o]&&"blockquote"===n[r].subCommand){i.push(r);break}if("string"==typeof e[o]&&"inlinecode"===e[o].toLocaleLowerCase()&&"InlineCode"===n[r].subCommand){i.push(r);break}if("FileManager"===e[o]&&"File"===n[r].subCommand){i.push(r);break}if("object"==typeof e[o]&&"Custom"===e[o].command){i.push(o);break}if(!t.isNullOrUndefined(e[o])&&!t.isNullOrUndefined(n[r])&&!t.isNullOrUndefined(n[r].subCommand)&&"string"==typeof e[o]&&"string"==typeof n[r].subCommand&&e[o].toLowerCase()===n[r].subCommand.toLowerCase()){i.push(r);break}}return i}function de(e,n){for(var i=0,o=le(se(En),e.toolbarObj.items),r=t.selectAll("."+Ye,e.toolbarObj.element),s=0,a=Object.keys(n);s<a.length;s++){var l=a[s],d=r[o[i]];d&&e.toolbarObj.enableItems(d,n[""+l]),i++}}function ce(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!1,!0),e.dispatchEvent(n)}function pe(e){var n=t.createElement("template");return n.innerHTML=e,n.content instanceof DocumentFragment?n.content:document.createRange().createContextualFragment(e)}function he(e,t){var n=[];for(t=t.firstChild;t;t=t.nextSibling)3===t.nodeType?n.push(t):n=n.concat(he(e,t));return n}function ue(e){for(var t={},n=Object.keys(e),i=0;i<Object.keys(e).length;i++)t[n[i].toLocaleLowerCase()]=e[n[i]];return t}function me(e,n){var i;return t.isNullOrUndefined(e)||""===e?i="DIV"===n.enterKey?n.enableHtmlEncode?"<div><br/></div>":"<div><br/></div>":"BR"===n.enterKey?n.enableHtmlEncode?"<br/>":"<br/>":n.enableHtmlEncode?"<p><br/></p>":"<p><br/></p>":(i=n.enableHtmlEncode?fe(ve(e),n):fe(e,n),n.setProperties({value:i},!0)),i}function fe(e,n){var i=document.createElement("div"),o=document.createElement("div"),r=i.childNodes;if(i.innerHTML=e.trim(),i.setAttribute("class","tempDiv"),r.length>0){for(var s=i.querySelectorAll(Ve),a=0;a<s.length;a++)s[a].innerHTML="<br>";for(var l=i.querySelectorAll("p"),a=0;a<l.length;a++){var d=l[a];0===d.textContent.trim().length&&1===d.childNodes.length&&3===d.childNodes[0].nodeType&&t.isNullOrUndefined(d.childNodes[0].textContent.match(/\u00a0/g))&&(d.innerHTML="<br>")}for(var c=i.querySelectorAll(ze),a=0;a<c.length;a++)c[a].innerHTML="​";for(var p=void 0,h=void 0,u=void 0;i.firstChild;){var m=!1,f=i.firstChild;if(3===f.nodeType&&" "===f.textContent){var v=["A","ABBR","ACRONYM","B","BDO","BIG","BR","BUTTON","CITE","CODE","DFN","EM","I","INPUT","KBD","LABEL","MAP","OBJECT","Q","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","TT","U","VAR","WBR"];m=!(!t.isNullOrUndefined(f.nextSibling)&&-1!==v.indexOf(f.nextSibling.nodeName))}var C=f.nodeName.toLocaleLowerCase();"BR"!==n.enterKey&&(3===f.nodeType&&(f.textContent.indexOf("\n")<0||""!==f.textContent.trim())||Sn.indexOf(C)>=0)&&!m?(p?h.appendChild(f):(u="DIV"===n.enterKey?t.createElement("div"):t.createElement("p"),o.appendChild(u),u.appendChild(f)),h=u,p=!0):3!==f.nodeType||!("\n"===f.textContent||f.textContent.indexOf("\n")>=0&&""===f.textContent.trim()||m)||!t.isNullOrUndefined(n.sourceCodeModule)&&t.isNullOrUndefined(n.sourceCodeModule)?(o.appendChild(f),p=!1):t.detach(f)}for(var y=o.querySelectorAll("img"),a=0;a<y.length;a++){var N=y[a];if(!N.classList.contains("e-rte-image-unsupported")){N.classList.contains(et)||N.classList.add(et);var E=t.closest(N,".e-img-caption")||t.closest(N,".e-rte-img-caption")||t.closest(N,".e-caption-inline");E?g(E,N,Nn):b(N,Nn)}}}return o.innerHTML}function ge(e){return"DIV"===e.enterKey?e.enableHtmlEncode?"<div><br/></div>":"<div><br/></div>":"BR"===e.enterKey?e.enableHtmlEncode?"<br/>":"<br/>":e.enableHtmlEncode?"<p><br/></p>":"<p><br/></p>"}function be(e){return"<p><br></p>"===e||"<p><br></p>"===e||"<div><br></div>"===e||"<div><br></div>"===e||"<br>"===e||"<br>"===e||""===e}function ve(e){return e.replace(/&/g,"&").replace(/&lt;/g,"<").replace(/</g,"<").replace(/&gt;/g,">").replace(/>/g,">").replace(/ /g," ").replace(/&nbsp;/g," ").replace(/"/g,"").replace(/<(\/?)(head|title|script|style|textarea|xmp|plaintext|noframes|noscript)([\s>/])/gi,"<$1$2$3")}function Ce(e,n){if(n.enableHtmlSanitizer){var i=t.SanitizeHtmlHelper.beforeSanitize();i.selectors.tags[2]&&i.selectors.tags[2].indexOf("iframe")>-1&&(i.selectors.tags[2]="iframe:not(.e-rte-embed-url)");var o={cancel:!1,helper:null};t.extend(i,i,o),n.trigger("beforeSanitizeHtml",i),i.cancel&&!t.isNullOrUndefined(i.helper)?e=i.helper(e):i.cancel||(e=t.SanitizeHtmlHelper.serializeValue(i,e))}return e=ye(e)}function ye(e){var n=t.createElement("div");e=e.replace(/&(times|divide|ne)/g,"&amp;$1"),n.innerHTML=e,n.querySelectorAll("font").forEach(function(e){var n=document.createElement("span"),i=(e.getAttribute("style")||"").replace(/style:/gi,"").trim();t.isNullOrUndefined(i)||""===i.trim()||i.endsWith(";")||(i+=";"),Array.from(e.attributes).forEach(function(e){var t=e.name.toLowerCase(),n=e.value;switch(t){case"size":i+="font-size:"+n+";";break;case"face":i+="font-family:"+n+";";break;case"bgcolor":i+="background-color:"+n+";";break;case"style":break;default:i+=t+":"+n+";"}}),t.isNullOrUndefined(i)||""===i.trim()||(i=i.replace(/;;+/g,";"),n.setAttribute("style",i)),n.innerHTML=e.innerHTML,t.isNullOrUndefined(e.parentNode)||e.parentNode.replaceChild(n,e)});var i=n.innerHTML;return n.remove(),i}function Ne(e,t,n){for(var i=0;t.length>i;i++)if(t[i].value===n.value||t[i].value===n.subCommand)return e.localeObj.getConstant(t[i].locale);return n.text}function Ee(e){it.forEach(function(t,n){it[n].text=Ne(e,jt,it[n])}),st.forEach(function(t,n){st[n].text=Ne(e,_t,st[n])}),dt.forEach(function(t,n){dt[n].text=Ne(e,Vt,dt[n])}),ct.forEach(function(t,n){ct[n].text=Ne(e,zt,ct[n])})}function Se(e){return["e-img-inline","e-img-break","e-img-left","e-img-right","e-img-center","e-img-left-wrap","e-img-right-wrap"].find(function(t){return e.classList.contains(t)})||""}function Te(e,t,n,i){var o;if(o=n?t.contentModule.getDocument().querySelector("body"):t.element,Object.keys(e).length)for(var r=0,s=Object.keys(e);r<s.length;r++){var a=s[r];"class"===a?o.classList.add(e[""+a]):"disabled"===a&&"disabled"===e[""+a]?(t.enabled=!1,t.setEnable()):"readonly"===a&&"readonly"===e[""+a]?(t.readonly=!0,t.setReadOnly(i)):"style"===a?o.style.cssText=e[""+a]:"tabindex"===a?t.inputElement.setAttribute("tabindex",e[""+a]):"placeholder"===a?(t.placeholder=e[""+a],t.setPlaceHolder()):["name","required"].indexOf(a)>-1?t.valueContainer.setAttribute(a,e[""+a]):o.setAttribute(a,e[""+a])}}var Oe="initial-end",Le="destroy",ke="toolbar-refresh",we="bind-on-end",xe="model-changed",De="keyUp",Be="keyDown",Ae="actionBegin",Me="selection-save",Ie="selection-restore",Re="mouseDown",Pe="editAreaClick",Ue="scroll",He="paste-content",Fe="code-block-paste-content",qe="rtl-mode",je="checkUndoStack",_e="bindCssClass",Ve="address:empty, article:empty, aside:empty, blockquote:empty,\n details:empty, dd:empty, div:empty, dl:empty, dt:empty, fieldset:empty, footer:empty,form:empty, h1:empty,\n h2:empty, h3:empty, h4:empty, h5:empty, h6:empty, header:empty, hgroup:empty, li:empty, main:empty, nav:empty,\n noscript:empty, output:empty, p:empty, pre:empty, section:empty, td:empty, th:empty",ze="a:empty, abbr:empty, acronym:empty, b:empty, bdi:empty, bdo:empty, big:empty, button:empty,\ncanvas:empty, cite:empty, code:empty, data:empty, datalist:empty, del:empty, dfn:empty, em:empty, font:empty, i:empty, iframe:empty,\nins:empty, kbd:empty, label:empty, map:empty, mark:empty, meter:empty, noscript:empty, object:empty, output:empty, picture:empty, progress:empty,\nq:empty, ruby:empty, s:empty, samp:empty, script:empty, select:empty, slot:empty, small:empty, span:empty, strong:empty, strike:empty, sub:empty, sup:empty, svg:empty,\ntemplate:empty, textarea:empty, time:empty, u:empty, tt:empty, var:empty, wbr:empty",We="e-richtexteditor",Qe="e-rte-quick-toolbar",Ke="e-rte-dropdown-popup",Ge="e-rte-dropdown-items",Xe="e-rte-dropdown-btn",Ye="e-toolbar-item",$e="e-rte-character-count",Je="e-active",Ze="e-rte-dropdown",et="e-rte-image";!function(e){e[e.Toolbar=0]="Toolbar",e[e.Content=1]="Content",e[e.Popup=2]="Popup",e[e.LinkToolbar=3]="LinkToolbar",e[e.TextToolbar=4]="TextToolbar",e[e.ImageToolbar=5]="ImageToolbar",e[e.AudioToolbar=6]="AudioToolbar",e[e.VideoToolbar=7]="VideoToolbar",e[e.InlineToolbar=8]="InlineToolbar",e[e.TableToolbar=9]="TableToolbar"}(e.RenderType||(e.RenderType={}));var tt={Custom:["","#000000","#ffff00","#00ff00","#00ffff","#0000ff","#ff0000","#000080","#800080","#996633","#f2f2f2","#808080","#ffffcc","#b3ffb3","#ccffff","#ccccfe","#ffcccc","#ccccff","#ff80ff","#f2e6d9","#d9d9d9","#595959","#ffff80","#80ff80","#b3ffff","#8080fe","#ff8080","#8080ff","#ff00ff","#dfbf9f","#bfbfbf","#404040","#ffff33","#33ff33","#33ffff","#3333ff","#ff3333","#0000b3","#b300b3","#c68c53","#a6a6a6","#262626","#e6e600","#00b300","#009999","#000099","#b30000","#000065","#660066","#86592d","#7f7f7f","#0d0d0d","#999900","#006600","#006666","#000066","#660000","#00004d","#4d004d","#734d26"]},nt={Custom:["","#000000","#e7e6e6","#44546a","#4472c4","#ed7d31","#a5a5a5","#ffc000","#70ad47","#ff0000","#f2f2f2","#808080","#cfcdcd","#d5dce4","#d9e2f3","#fbe4d5","#ededed","#fff2cc","#e2efd9","#ffcccc","#d9d9d9","#595959","#aeaaaa","#acb9ca","#b4c6e7","#f7caac","#dbdbdb","#ffe599","#c5e0b3","#ff8080","#bfbfbf","#404040","#747070","#8496b0","#8eaadb","#f4b083","#c9c9c9","#ffd966","#a8d08d","#ff3333","#a6a6a6","#262626","#3b3838","#323e4f","#2f5496","#c45911","#7b7b7b","#bf8f00","#538135","#b30000","#7f7f7f","#0d0d0d","#161616","#212934","#1f3763","#823b0b","#525252","#7f5f00","#375623","#660000"]},it=[{cssClass:"e-default",text:"Default",command:"Font",subCommand:"FontName",value:""},{cssClass:"e-segoe-ui",text:"Segoe UI",command:"Font",subCommand:"FontName",value:"Segoe UI"},{cssClass:"e-arial",text:"Arial",command:"Font",subCommand:"FontName",value:"Arial,Helvetica,sans-serif"},{cssClass:"e-georgia",text:"Georgia",command:"Font",subCommand:"FontName",value:"Georgia,serif"},{cssClass:"e-impact",text:"Impact",command:"Font",subCommand:"FontName",value:"Impact,Charcoal,sans-serif"},{cssClass:"e-tahoma",text:"Tahoma",command:"Font",subCommand:"FontName",value:"Tahoma,Geneva,sans-serif"},{cssClass:"e-times-new-roman",text:"Times New Roman",command:"Font",subCommand:"FontName",value:"Times New Roman,Times,serif"},{cssClass:"e-verdana",text:"Verdana",command:"Font",subCommand:"FontName",value:"Verdana,Geneva,sans-serif"}],ot=[{text:"Default",value:""},{text:"8 pt",value:"8pt"},{text:"10 pt",value:"10pt"},{text:"12 pt",value:"12pt"},{text:"14 pt",value:"14pt"},{text:"18 pt",value:"18pt"},{text:"24 pt",value:"24pt"},{text:"36 pt",value:"36pt"}],rt=[{text:"Default",value:""},{text:"1",value:"1"},{text:"1.15",value:"1.15"},{text:"1.5",value:"1.5"},{text:"2",value:"2"},{text:"2.5",value:"2.5"},{text:"3",value:"3"}],st=[{cssClass:"e-paragraph",text:"Paragraph",command:"Formats",subCommand:"P",value:"P"},{cssClass:"e-h1",text:"Heading 1",command:"Formats",subCommand:"H1",value:"H1"},{cssClass:"e-h2",text:"Heading 2",command:"Formats",subCommand:"H2",value:"H2"},{cssClass:"e-h3",text:"Heading 3",command:"Formats",subCommand:"H3",value:"H3"},{cssClass:"e-h4",text:"Heading 4",command:"Formats",subCommand:"H4",value:"H4"},{cssClass:"e-code",text:"preformatted",command:"Formats",subCommand:"Pre",value:"Pre"}],at=["Bold","Italic","Underline","|","Formats","Alignments","Blockquote","OrderedList","UnorderedList","|","CreateLink","Image","|","SourceCode","Undo","Redo"],lt=[{text:"Dashed Borders",cssClass:"e-dashed-borders",command:"Table",subCommand:"Dashed"},{text:"Alternate Rows",cssClass:"e-alternate-rows",command:"Table",subCommand:"Alternate"}],dt=[{text:"None",command:"Lists",subCommand:"NumberFormatList",value:"none"},{text:"Number",command:"Lists",subCommand:"NumberFormatList",value:"decimal"},{text:"Lower Greek",command:"Lists",subCommand:"NumberFormatList",value:"lowerGreek"},{text:"Lower Roman",command:"Lists",subCommand:"NumberFormatList",value:"lowerRoman"},{text:"Upper Alpha",command:"Lists",subCommand:"NumberFormatList",value:"upperAlpha"},{text:"Lower Alpha",command:"Lists",subCommand:"NumberFormatList",value:"lowerAlpha"},{text:"Upper Roman",command:"Lists",subCommand:"NumberFormatList",value:"upperRoman"}],ct=[{text:"None",command:"Lists",subCommand:"BulletFormatList",value:"none"},{text:"Disc",command:"Lists",subCommand:"BulletFormatList",value:"disc"},{text:"Circle",command:"Lists",subCommand:"BulletFormatList",value:"circle"},{text:"Square",command:"Lists",subCommand:"BulletFormatList",value:"square"}],pt=[{language:"plaintext",label:"Plain text"},{language:"c",label:"C"},{language:"csharp",label:"C#"},{language:"cpp",label:"C++"},{language:"css",label:"CSS"},{language:"diff",label:"Diff"},{language:"html",label:"HTML"},{language:"java",label:"Java"},{language:"javascript",label:"JavaScript"},{language:"php",label:"PHP"},{language:"python",label:"Python"},{language:"ruby",label:"Ruby"},{language:"sql",label:"SQL"},{language:"typescript",label:"TypeScript"},{language:"xml",label:"XML"}],ht=[{name:"Smilies & People",code:"1F600",iconCss:"e-emoji",icons:[{code:"1F600",desc:"Grinning face"},{code:"1F603",desc:"Grinning face with big eyes"},{code:"1F604",desc:"Grinning face with smiling eyes"},{code:"1F606",desc:"Grinning squinting face"},{code:"1F605",desc:"Grinning face with sweat"},{code:"1F602",desc:"Face with tears of joy"},{code:"1F923",desc:"Rolling on the floor laughing"},{code:"1F60A",desc:"Smiling face with smiling eyes"},{code:"1F607",desc:"Smiling face with halo"},{code:"1F642",desc:"Slightly smiling face"},{code:"1F643",desc:"Upside-down face"},{code:"1F60D",desc:"Smiling face with heart-eyes"},{code:"1F618",desc:"Face blowing a kiss"},{code:"1F61B",desc:"Face with tongue"},{code:"1F61C",desc:"Winking face with tongue"},{code:"1F604",desc:"Grinning face with smiling eyes"},{code:"1F469",desc:"Woman"},{code:"1F468",desc:"Man"},{code:"1F467",desc:"Girl"},{code:"1F466",desc:"Boy"},{code:"1F476",desc:"Baby"},{code:"1F475",desc:"Old woman"},{code:"1F474",desc:"Old man"},{code:"1F46E",desc:"Police officer"},{code:"1F477",desc:"Construction worker"},{code:"1F482",desc:"Guard"},{code:"1F575",desc:"Detective"},{code:"1F9D1",desc:"Cook"}]},{name:"Animals & Nature",code:"1F435",iconCss:"e-animals",icons:[{code:"1F436",desc:"Dog face"},{code:"1F431",desc:"Cat face"},{code:"1F42D",desc:"Mouse face"},{code:"1F439",desc:"Hamster face"},{code:"1F430",desc:"Rabbit face"},{code:"1F98A",desc:"Fox face"},{code:"1F43B",desc:"Bear face"},{code:"1F43C",desc:"Panda face"},{code:"1F428",desc:"Koala"},{code:"1F42F",desc:"Tiger face"},{code:"1F981",desc:"Lion face"},{code:"1F42E",desc:"Cow face"},{code:"1F437",desc:"Pig face"},{code:"1F43D",desc:"Pig nose"},{code:"1F438",desc:"Frog face"},{code:"1F435",desc:"Monkey face"},{code:"1F649",desc:"Hear-no-evil monkey"},{code:"1F64A",desc:"Speak-no-evil monkey"},{code:"1F412",desc:"Monkey"},{code:"1F414",desc:"Chicken"},{code:"1F427",desc:"Penguin"},{code:"1F426",desc:"Bird"},{code:"1F424",desc:"Baby chick"},{code:"1F986",desc:"Duck"},{code:"1F985",desc:"Eagle"}]},{name:"Food & Drink",code:"1F347",iconCss:"e-food-and-drinks",icons:[{code:"1F34E",desc:"Red apple"},{code:"1F34C",desc:"Banana"},{code:"1F347",desc:"Grapes"},{code:"1F353",desc:"Strawberry"},{code:"1F35E",desc:"Bread"},{code:"1F950",desc:"Croissant"},{code:"1F955",desc:"Carrot"},{code:"1F354",desc:"Hamburger"},{code:"1F355",desc:"Pizza"},{code:"1F32D",desc:"Hot dog"},{code:"1F35F",desc:"French fries"},{code:"1F37F",desc:"Popcorn"},{code:"1F366",desc:"Soft ice cream"},{code:"1F367",desc:"Shaved ice"},{code:"1F36A",desc:"Cookie"},{code:"1F382",desc:"Birthday cake"},{code:"1F370",desc:"Shortcake"},{code:"1F36B",desc:"Chocolate bar"},{code:"1F369",desc:"Donut"},{code:"1F36E",desc:"Custard"},{code:"1F36D",desc:"Lollipop"},{code:"1F36C",desc:"Candy"},{code:"1F377",desc:"Wine glass"},{code:"1F37A",desc:"Beer mug"},{code:"1F37E",desc:"Bottle with popping cork"}]},{name:"Activities",code:"1F383",iconCss:"e-activities",icons:[{code:"26BD",desc:"Soccer ball"},{code:"1F3C0",desc:"Basketball"},{code:"1F3C8",desc:"American football"},{code:"26BE",desc:"Baseball"},{code:"1F3BE",desc:"Tennis"},{code:"1F3D0",desc:"Volleyball"},{code:"1F3C9",desc:"Rugby football"},{code:"1F3B1",desc:"Pool 8 ball"},{code:"1F3D3",desc:"Ping pong"},{code:"1F3F8",desc:"Badminton"},{code:"1F94A",desc:"Boxing glove"},{code:"1F3CA",desc:"Swimmer"},{code:"1F3CB",desc:"Weightlifter"},{code:"1F6B4",desc:"Bicyclist"},{code:"1F6F9",desc:"Skateboard"},{code:"1F3AE",desc:"Video game"},{code:"1F579",desc:"Joystick"},{code:"1F3CF",desc:"Cricket"},{code:"1F3C7",desc:"Horse racing"},{code:"1F3AF",desc:"Direct hit"},{code:"1F3D1",desc:"Field hockey"},{code:"1F3B0",desc:"Slot machine"},{code:"1F3B3",desc:"Bowling"},{code:"1F3B2",desc:"Game die"},{code:"265F",desc:"Chess pawn"}]},{name:"Travel & Places",code:"1F30D",iconCss:"e-travel-and-places",icons:[{code:"2708",desc:"Airplane"},{code:"1F697",desc:"Automobile"},{code:"1F695",desc:"Taxi"},{code:"1F6B2",desc:"Bicycle"},{code:"1F68C",desc:"Bus"},{code:"1F682",desc:"Locomotive"},{code:"1F6F3",desc:"Passenger ship"},{code:"1F680",desc:"Rocket"},{code:"1F681",desc:"Helicopter"},{code:"1F6A2",desc:"Ship"},{code:"1F3DF",desc:"Stadium"},{code:"1F54C",desc:"Mosque"},{code:"26EA",desc:"Church"},{code:"1F6D5",desc:"Hindu Temple"},{code:"1F3D4",desc:"Snow-capped mountain"},{code:"1F3EB",desc:"School"},{code:"1F30B",desc:"Volcano"},{code:"1F3D6",desc:"Beach with umbrella"},{code:"1F3DD",desc:"Desert island"},{code:"1F3DE",desc:"National park"},{code:"1F3F0",desc:"Castle"},{code:"1F5FC",desc:"Tokyo tower"},{code:"1F5FD",desc:"Statue of liberty"},{code:"26E9",desc:"Shinto shrine"},{code:"1F3EF",desc:"Japanese castle"},{code:"1F3A2",desc:"Roller coaster"}]},{name:"Objects",code:"1F507",iconCss:"e-objects",icons:[{code:"1F4A1",desc:"Light bulb"},{code:"1F526",desc:"Flashlight"},{code:"1F4BB",desc:"Laptop computer"},{code:"1F5A5",desc:"Desktop computer"},{code:"1F5A8",desc:"Printer"},{code:"1F4F7",desc:"Camera"},{code:"1F4F8",desc:"Camera with flash"},{code:"1F4FD",desc:"Film projector"},{code:"1F3A5",desc:"Movie camera"},{code:"1F4FA",desc:"Television"},{code:"1F4FB",desc:"Radio"},{code:"1F50B",desc:"Battery"},{code:"231A",desc:"Watch"},{code:"1F4F1",desc:"Mobile phone"},{code:"260E",desc:"Telephone"},{code:"1F4BE",desc:"Floppy disk"},{code:"1F4BF",desc:"Optical disk"},{code:"1F4C0",desc:"Digital versatile disc"},{code:"1F4BD",desc:"Computer disk"},{code:"1F3A7",desc:"Headphone"},{code:"1F3A4",desc:"Microphone"},{code:"1F3B6",desc:"Multiple musical notes"},{code:"1F4DA",desc:"Books"}]},{name:"Symbols",code:"1F3E7",iconCss:"e-symbols",icons:[{code:"274C",desc:"Cross mark"},{code:"2714",desc:"Check mark"},{code:"26A0",desc:"Warning sign"},{code:"1F6AB",desc:"Prohibited"},{code:"2139",desc:"Information"},{code:"267B",desc:"Recycling symbol"},{code:"1F6AD",desc:"No smoking"},{code:"1F4F5",desc:"No mobile phones"},{code:"1F6AF",desc:"No littering"},{code:"1F6B3",desc:"No bicycles"},{code:"1F6B7",desc:"No pedestrians"},{code:"2795",desc:"Plus"},{code:"2796",desc:"Minus"},{code:"2797",desc:"Divide"},{code:"2716",desc:"Multiplication"},{code:"1F4B2",desc:"Dollar banknote"},{code:"1F4AC",desc:"Speech balloon"},{code:"2755",desc:"White exclamation mark"},{code:"2754",desc:"White question mark"},{code:"2764",desc:"Heart"}]}],ut=["lineheight","alignments","formats","fontname","fontsize","fontcolor","backgroundcolor","align","display","audiolayoutoption","videolayoutoption","videoalign","tablerows","tablecolumns","tablecell","tablecellhorizontalalign","tablecellverticalalign","styles","numberformatlist","bulletformatlist","codeblock","borderstyle","tablebackgroundcolor","bordercolor","aicommands","wraptext"],mt={alignments:{id:"Alignments",icon:"e-alignments",tooltip:"Alignments",command:"Alignments",subCommand:"Alignments"},justifyleft:{id:"JustifyLeft",icon:"e-justify-left",tooltip:"JustifyLeft",command:"Alignments",subCommand:"JustifyLeft"},justifycenter:{id:"JustifyCenter",icon:"e-justify-center",tooltip:"JustifyCenter",command:"Alignments",subCommand:"JustifyCenter"},justifyright:{id:"JustifyRight",icon:"e-justify-right",tooltip:"JustifyRight",command:"Alignments",subCommand:"JustifyRight"},justifyfull:{id:"JustifyFull",icon:"e-justify-full",tooltip:"JustifyFull",command:"Alignments",subCommand:"JustifyFull"},lineheight:{id:"LineHeight",icon:"e-lineHeight",tooltip:"Line Height",command:"LineHeight",subCommand:"LineHeight"},wraptext:{id:"WrapText",icon:"e-left-wrap",tooltip:"WrapText",command:"WrapText",subCommand:"WrapText"},leftwrap:{id:"WrapText",icon:"e-left-wrap",tooltip:"ImageLeftWrap",command:"WrapText",subCommand:"ImageLeftWrap"},rightwrap:{id:"WrapText",icon:"e-right-wrap",tooltip:"ImageRightWrap",command:"WrapText",subCommand:"ImageRightWrap"},fontname:{id:"FontName",icon:"e-font-name",tooltip:"Font Name",command:"Font",subCommand:"FontName"},fontsize:{id:"FontSize",icon:"e-font-size",tooltip:"Font Size",command:"Font",subCommand:"FontSize"},fontcolor:{id:"FontColor",icon:"e-rte-font-color",tooltip:"Font Color",command:"Font",subCommand:"FontColor",value:"#ff0000ff"},backgroundcolor:{id:"BackgroundColor",icon:"e-background-color",tooltip:"Background Color",command:"Font",subCommand:"BackgroundColor",value:"#ffff00ff"},importword:{id:"ImportWord",icon:"e-rte-import-doc",tooltip:"Import from Word",command:"Import",subCommand:"ImportWord"},exportword:{id:"ExportWord",icon:"e-rte-export-doc",tooltip:"Export to Word",command:"Export",subCommand:"ExportWord"},exportpdf:{id:"ExportPdf",icon:"e-rte-export-pdf",tooltip:"Export to PDF",command:"Export",subCommand:"ExportPdf"},bold:{id:"Bold",icon:"e-bold",tooltip:"Bold",command:"Style",subCommand:"Bold"},italic:{id:"Italic",icon:"e-italic",tooltip:"Italic",command:"Style",subCommand:"Italic"},underline:{id:"Underline",icon:"e-underline",tooltip:"Underline",command:"Style",subCommand:"Underline"},strikethrough:{id:"StrikeThrough",icon:"e-strike-through",tooltip:"StrikeThrough",command:"Style",subCommand:"StrikeThrough"},clearformat:{id:"ClearFormat",icon:"e-clear-format",tooltip:"Clear Format",command:"Clear",subCommand:"ClearFormat"},clearall:{id:"ClearAll",icon:"e-clear-all",tooltip:"Clear All",command:"Clear",subCommand:"ClearAll"},cut:{id:"Cut",icon:"e-cut",tooltip:"Cut",command:"ClipBoard",subCommand:"Cut"},copy:{id:"Copy",icon:"e-copy",tooltip:"Copy",command:"ClipBoard",subCommand:"Copy"},paste:{id:"Paste",icon:"e-paste",tooltip:"Paste",command:"ClipBoard",subCommand:"Paste"},unorderedlist:{id:"UnorderedList",icon:"e-unorder-list",tooltip:"Bulleted List",command:"Lists",subCommand:"UL"},orderedlist:{id:"OrderedList",icon:"e-order-list",tooltip:"Numbered List",command:"Lists",subCommand:"OL"},numberformatlist:{id:"NumberFormatList",icon:"e-order-list",tooltip:"Number Format List",command:"NumberFormatList",subCommand:"NumberFormatList"},bulletformatlist:{id:"BulletFormatList",icon:"e-unorder-list",tooltip:"Bullet Format List",command:"BulletFormatList",subCommand:"BulletFormatList"},indent:{id:"Indent",icon:"e-indent",tooltip:"Increase Indent",command:"Indents",subCommand:"Indent"},outdent:{id:"Outdent",icon:"e-outdent",tooltip:"Decrease Indent",command:"Indents",subCommand:"Outdent"},undo:{id:"Undo",icon:"e-undo",tooltip:"Undo",command:"Actions",subCommand:"Undo"},redo:{id:"Redo",icon:"e-redo",tooltip:"Redo",command:"Actions",subCommand:"Redo"},superscript:{id:"SuperScript",icon:"e-super-script",tooltip:"Superscript",command:"Effects",subCommand:"SuperScript"},subscript:{id:"SubScript",icon:"e-sub-script",tooltip:"Subscript",command:"Effects",subCommand:"SubScript"},createlink:{id:"CreateLink",icon:"e-create-link",tooltip:"Insert Hyperlink",command:"Links",subCommand:"CreateLink"},openlink:{id:"OpenLink",icon:"e-open-link",tooltip:"Open Link",command:"Links",subCommand:"OpenLink"},editlink:{id:"EditLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Links",subCommand:"EditLink"},removelink:{id:"RemoveLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Links",subCommand:"RemoveLink"},image:{id:"Image",icon:"e-image",tooltip:"Insert Image",command:"Images",subCommand:"Image"},audio:{id:"Audio",icon:"e-audio",tooltip:"Insert Audio",command:"Audios",subCommand:"Audio"},video:{id:"Video",icon:"e-video",tooltip:"Insert Video",command:"Videos",subCommand:"Video"},filemanager:{id:"FileManager",icon:"e-rte-file-manager",tooltip:"File Manager",command:"Files",subCommand:"File"},createtable:{id:"CreateTable",icon:"e-create-table",tooltip:"Create Table",command:"Table",subCommand:"CreateTable"},removetable:{id:"removeTable",icon:"e-remove-table",tooltip:"Remove Table",command:"removeTable",subCommand:"removeTable"},replace:{id:"Replace",icon:"e-replace",tooltip:"Replace",command:"Images",subCommand:"Replace"},audioreplace:{id:"AudioReplace",icon:"e-audio-replace",tooltip:"Audio Replace",command:"Audios",subCommand:"AudioReplace"},audioremove:{id:"AudioRemove",icon:"e-audio-remove",tooltip:"Audio Remove",command:"Audios",subCommand:"AudioRemove"},audiolayoutoption:{id:"AudioLayoutOption",icon:"e-audio-display",tooltip:"Audio LayoutOption",command:"Audios",subCommand:"AudioLayoutOption"},videoreplace:{id:"VideoReplace",icon:"e-video-replace",tooltip:"Video Replace",command:"Videos",subCommand:"VideoReplace"},videoalign:{id:"VideoAlign",icon:"e-video-align",tooltip:"Video Align",command:"Videos",subCommand:"VideoAlign"},videoremove:{id:"VideoRemove",icon:"e-video-remove",tooltip:"Video Remove",command:"Videos",subCommand:"VideoRemove"},videolayoutoption:{id:"VideoLayoutOption",icon:"e-video-display",tooltip:"Video LayoutOption",command:"Videos",subCommand:"VideoLayoutOption"},videodimension:{id:"VideoDimension",icon:"e-video-dimension",tooltip:"Video Dimension",command:"Videos",subCommand:"VideoDimension"},align:{id:"Align",icon:"e-align",tooltip:"Align",command:"Images",subCommand:"Align"},caption:{id:"Caption",icon:"e-caption",tooltip:"Image Caption",command:"Images",subCommand:"Caption"},remove:{id:"Remove",icon:"e-remove",tooltip:"Remove",command:"Images",subCommand:"Remove"},openimagelink:{id:"OpenImageLink",icon:"e-open-link",tooltip:"Open Link",command:"Images",subCommand:"OpenImageLink"},editimagelink:{id:"EditImageLink",icon:"e-edit-link",tooltip:"Edit Link",command:"Images",subCommand:"EditImageLink"},removeimagelink:{id:"RemoveImageLink",icon:"e-remove-link",tooltip:"Remove Link",command:"Images",subCommand:"RemoveImageLink"},insertlink:{id:"InsertLink",icon:"e-insert-link",tooltip:"Insert Link",command:"Images",subCommand:"InsertLink"},display:{id:"Display",icon:"e-display",tooltip:"Display",command:"Images",subCommand:"Display"},alttext:{id:"AltText",icon:"e-alt-text",tooltip:"Alternative Text",command:"Images",subCommand:"AltText"},dimension:{id:"Dimension",icon:"e-img-dimension",tooltip:"Change Size",command:"Images",subCommand:"Dimension"},fullscreen:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"View",subCommand:"Maximize"},maximize:{id:"Maximize",icon:"e-maximize",tooltip:"Maximize",command:"FullScreen",subCommand:"Maximize"},minimize:{id