@firestitch/froala
Version:
The next generation Javascript WYSIWYG HTML rich text editor made by devs for devs. High performance and modern design make it easy to use for developers and loved by users.
3 lines (2 loc) • 18 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(_){"use strict";_=_&&_.hasOwnProperty("default")?_.default:_,Object.assign(_.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),_.PLUGINS.wordPaste=function(M){var i,r,l=M.$,n="word_paste",f={};function a(e){var t=M.opts.wordAllowedStyleProps,e=(e||(M.opts.wordAllowedStyleProps=[]),r=o(r=(r=0===r.indexOf("<colgroup>")?"<table>"+r+"</table>":r).replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,function(e,t){for(var i="",r=0;r++<t.length;)i+=" ";return i}),M.paste.getRtfClipboard()),M.doc.createElement("DIV"));e.innerHTML=r,M.html.cleanBlankSpaces(e),r=e.innerHTML,r=(r=M.paste.cleanEmptyTagsAndDivs(r)).replace(/\u200b/g,""),M.modals.hide(n),M.paste.clean(r,!0,!0),M.opts.wordAllowedStyleProps=t}function L(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t){if(t(e))for(var i=e.firstChild;i;){var r=i,n=i.previousSibling,i=i.nextSibling;u(r,t),r.previousSibling||r.nextSibling||r.parentNode||!i||n===i.previousSibling||!i.parentNode?r.previousSibling||r.nextSibling||r.parentNode||!i||i.previousSibling||i.nextSibling||i.parentNode||(n?i=n.nextSibling?n.nextSibling.nextSibling:null:e.firstChild&&(i=e.firstChild.nextSibling)):i=n?n.nextSibling:e.firstChild}}function H(e){if(e.getAttribute("style")&&/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,""))){try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(e){return}return 1}}function N(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function x(e,i){var t,r=e.cloneNode(!0);return-1!==["H1","H2","H3","H4","H5","H6"].indexOf(e.tagName)&&((t=document.createElement(e.tagName.toLowerCase())).setAttribute("style",e.getAttribute("style")),t.innerHTML=r.innerHTML,r.innerHTML=t.outerHTML),u(r,function(e){if(e.nodeType==Node.COMMENT_NODE&&(M.browser.msie||M.browser.safari||M.browser.edge))try{if("[if !supportLists]"===e.data){for(e=e.nextSibling;e&&e.nodeType!==Node.COMMENT_NODE;){var t=e.nextSibling;e.parentNode.removeChild(e),e=t}e&&e.nodeType==Node.COMMENT_NODE&&e.parentNode.removeChild(e)}}catch(e){}return e.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===e.getAttribute("style")&&e.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===e.getAttribute("style")&&e.parentNode.removeChild(e),e.setAttribute("style",function(e){var t="",i=e.getAttribute("style");i&&["line-height","font-family","font-size","color","background"].forEach(function(e){e=i.match(new RegExp(e+":.*(;|)"));e&&(t+=e[0]+";")});return t}(e)),m(e,i)),!0}),r.innerHTML.replace(/<!--[\s\S]*?-->/gi,"")}function O(e,t){for(var i=document.createElement(t),r=0;r<e.attributes.length;r++){var n=e.attributes[r].name;"FONT"===e.tagName&&(M.browser.msie&&["id","class","style"].indexOf(n)<0||!M.browser.msie&&CSS.supports(n,e.getAttribute(n)))?l(i).css(n,e.getAttribute(n)):i.setAttribute(n,e.getAttribute(n))}return i.innerHTML=e.innerHTML,e.parentNode.replaceChild(i,e),i}function I(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function P(e){return e.replace(/\n|\r|\n\r|"/g,"")}function D(e,t,i){var r;t&&((r=e.getAttribute("style"))&&";"!==r.slice(-1)&&(r+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,""),e.setAttribute("style",i?(r||"")+t:t+(r||"")))}var p=null;function s(e,t,i){for(var r=e.split(i),n=1;n<r.length;n++)if(1<(l=(l=r[n]).split("shplid")).length){for(var l=l[1],a="",s=0;s<l.length&&"\\"!==l[s]&&"{"!==l[s]&&" "!==l[s]&&"\r"!==l[s]&&"\n"!==l[s];)a+=l[s],s++;var o=l.split("bliptag");if(!(o&&o.length<2)){var d=null;if(-1!==o[0].indexOf("pngblip")?d="image/png":-1!==o[0].indexOf("jpegblip")&&(d="image/jpeg"),d){o=o[1].split("}");if(!(o&&o.length<2)){var g=void 0;if(2<o.length&&-1!==o[0].indexOf("blipuid"))g=o[1].split(" ");else{if((g=o[0].split(" "))&&g.length<2)continue;g.shift()}o=g.join("");p[t+a]={image_hex:o,image_type:d}}}}}}function c(e,t){if(t){if("IMG"===e.tagName){var i=e.getAttribute("src");if(!i||-1===i.indexOf("file://"))return;if(0===i.indexOf("file://")&&M.helpers.isURL(e.getAttribute("alt")))return void e.setAttribute("src",e.getAttribute("alt"));(i=f[e.getAttribute("v:shapes")])||(i=e.getAttribute("v:shapes"),e.parentNode&&e.parentNode.parentNode&&0<=e.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(i=null))}else i=e.parentNode.getAttribute("o:spid");e.removeAttribute("height"),i&&(p={},s(t=t,"i","\\shppict"),s(t,"s","\\shp{"),t=p[i.substring(7)])&&(i=function(e){for(var t=e.match(/[0-9a-f]{2}/gi),i=[],r=0;r<t.length;r++)i.push(String.fromCharCode(parseInt(t[r],16)));return e=i.join(""),btoa(e)}(t.image_hex),t="data:"+t.image_type+";base64,"+i,"IMG"===e.tagName?(e.src=t,e.setAttribute("data-fr-image-pasted",!0)):l(e.parentNode).before('<img data-fr-image-pasted="true" src="'+t+'" style="'+e.parentNode.getAttribute("style")+'">').remove())}}function m(e,t){var i=e.tagName,r=i.toLowerCase();e.firstElementChild&&("I"===e.firstElementChild.tagName?O(e.firstElementChild,"em"):"B"===e.firstElementChild.tagName&&O(e.firstElementChild,"strong"));if(-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(i))return L(e),!1;for(var n=["META","LINK","XML","ST1:","O:","W:","FONT"],l=0;l<n.length;l++)if(-1!==i.indexOf(n[l]))return e.innerHTML&&(e.outerHTML=e.innerHTML),L(e),!1;if("TD"!==i){var a=e.getAttribute("class")||"MsoNormal";if(t&&a){for(var s=(a=P(a)).split(" "),o=0;o<s.length;o++){var d=[],g="."+s[o];d.push(g),d.push(r+g);for(var f=0;f<d.length;f++)t[d[f]]&&D(e,t[d[f]])}e.removeAttribute("class")}t&&t[r]&&D(e,t[r])}var u;if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(i)&&((a=e.getAttribute("class"))&&(t&&t[i.toLowerCase()+"."+a]&&D(e,t[i.toLowerCase()+"."+a]),-1!==a.toLowerCase().indexOf("mso"))&&((a=(a=P(a)).replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?e.setAttribute("class",a):e.removeAttribute("class")),(a=e.getAttribute("style"))&&(a=a.match(/text-align:.+?[; "]{1,1}/gi))&&a[a.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1"),I(e)),"TR"===i){var a=e,p=t;M.node.clearAttributes(a);for(var c=a.firstElementChild,m=0,h=!1,b=null;c;){c.firstElementChild&&-1!==c.firstElementChild.tagName.indexOf("W:")&&(c.innerHTML=c.firstElementChild.innerHTML),(b=c.getAttribute("width"))||(h=h||!0),m+=parseInt(b,10),(!c.firstChild||c.firstChild&&c.firstChild.data===_.UNICODE_NBSP)&&(c.firstChild&&L(c.firstChild),c.innerHTML="<br>");for(var v=c.firstElementChild,y=1===c.children.length;v;)"P"!==v.tagName||H(v)||y&&I(v),v=v.nextElementSibling;p&&((N=c.getAttribute("class"))&&(N=(N=P(N)).match(/xl[0-9]+/gi))&&p[N="."+N[0]]&&D(c,p[N]),p.td)&&D(c,p.td);var N=c.getAttribute("style"),x=((N=N&&P(N))&&";"!==N.slice(-1)&&(N+=";"),c.getAttribute("valign")),C=(!x&&N&&(C=N.match(/vertical-align:.+?[; "]{1,1}/gi))&&(x=C[C.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1")),null),A=(N&&"general"===(C=(A=N.match(/text-align:.+?[; "]{1,1}/gi))?A[A.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1"):C)&&(C=null),null),E=(N&&(E=N.match(/background:.+?[; "]{1,1}/gi))&&(A=E[E.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1")),c.getAttribute("colspan")),T=c.getAttribute("rowspan");E&&c.setAttribute("colspan",E),T&&c.setAttribute("rowspan",T),x&&(c.style["vertical-align"]=x),C&&(c.style["text-align"]=C),A&&(c.style["background-color"]=A),b&&c.setAttribute("width",b),c=c.nextElementSibling}for(c=a.firstElementChild;c;)b=c.getAttribute("width"),h?c.removeAttribute("width"):c.setAttribute("width",100*parseInt(b,10)/m+"%"),c=c.nextElementSibling}if("A"!==i||e.attributes.getNamedItem("href")||e.attributes.getNamedItem("name")||!e.innerHTML||(e.outerHTML=e.innerHTML),"A"==i&&e.getAttribute("href")&&e.querySelector("img"))for(var w=e.querySelectorAll("span"),S=0;S<w.length;S++)w[S].innerText||(w[S].outerHTML=w[S].innerHTML);return"TD"!==i&&"TH"!==i||e.innerHTML||(e.innerHTML="<br>"),"TABLE"===i&&(e.style.width=e.style.width),e.getAttribute("lang")&&e.removeAttribute("lang"),e.getAttribute("style")&&-1!==e.getAttribute("style").toLowerCase().indexOf("mso")&&((u=(u=P(e.getAttribute("style"))).replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?e.setAttribute("style",u):e.removeAttribute("style")),!0}function o(e,t){for(var a=(e=0<=e.indexOf("<html")?e.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1"):e).match(/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi),i=e.split("v:shape"),r=1;r<i.length;r++){var n=i[r],l=n.split(' id="')[1];l&&1<l.length&&(l=l.split('"')[0],n=n.split(' o:spid="')[1])&&1<n.length&&(n=n.split('"')[0],f[l]=n)}for(var e=(new DOMParser).parseFromString(e,"text/html"),s=e.head,e=e.body,o=function(e){var t={};if((e=e.getElementsByTagName("style")).length){var i=e[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(i)for(var r=0;r<i.length;r++){var n=i[r],l=n.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),a=n.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1"),l=l.replace(/^[\s]|[\s]$/gm,""),a=a.replace(/^[\s]|[\s]$/gm,"");l=l.replace(/\n|\r|\n\r/g,""),a=a.replace(/\n|\r|\n\r/g,"");for(var s=l.split(", "),o=0;o<s.length;o++)t[s[o]]=a}}return t}(s),d=(u(e,function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===_.UNICODE_NBSP?(e.data="",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(L(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0}),u(e,function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||c(e,t),!0}),e.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol")),g=d.length-1;0<=g;g--)d[g].previousElementSibling&&"LI"===d[g].previousElementSibling.tagName&&d[g].previousElementSibling.appendChild(d[g]);u(e,function(e){if(e.nodeType===Node.TEXT_NODE)e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>");else{var t,i,r,n;if(e.nodeType===Node.ELEMENT_NODE)return H(e)?(t=e.parentNode,n=e.previousSibling,i=function e(t,i,r,n){for(var l,a,s,o,d,g,f,u=/[0-9a-zA-Z]./gi,p=!1,c=navigator.userAgent.toLowerCase(),m=(-1!=c.indexOf("safari")&&(c=-1<c.indexOf("chrome")?1:"safari"),t.innerHTML.includes("mso-list:\nIgnore")&&(t.innerHTML=t.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore")),t.querySelector('span[style="mso-list:Ignore"]')),c=((m=null==m&&"safari"==c?t.querySelector('span[lang="PT-BR"]'):m)&&(p=p||u.test(m.textContent)),null!==m&&(g=m.textContent.trim().split(".")[0]),o=1==p?("1"==(g=m.textContent.trim().split(".")[0])?d="decimal;":"i"==g?d="lower-roman;":"I"==g?d="upper-roman;":"o"==g?d="circle;":g.match(/^v$/)||(g.match(/^[a-z]$/)||g.match(/^[a-z]\)$/)?d="lower-alpha;":(g.match(/^[A-Z]$/)||g.match(/^[A-Z]\)$/))&&(d="upper-alpha;")),d="list-style-type: "+d,"ol"):("§"==(g=null!=m?m.textContent.trim().split(".")[0]:g)?d="square;":"·"==g&&(d="disc;"),d="list-style-type: "+d,"ul"),""),p=(null==m||null==m.textContent||isNaN(parseInt(m.textContent.trim().split(".")[1],10))||(c=' class="decimal_type" '),N(t)),m=t.style.marginLeft,h=(m.includes("in")?(y="in",m=parseFloat(m)-.5):m.includes("pt")&&(y="px",m=parseFloat(m)-10),f=1==p?(f=d?"<"+o+' style = "'+d+"; margin-left:"+m+y+';">':"<"+o+' style="margin-left:'+m+y+';">',"list-style-type: upper-alpha;"==d?(p=g.charCodeAt(0)-64,d?"<"+o+c+' start="'+p+'" style = "'+d+" margin-left:"+m+y+';">':"<"+o+">"):"list-style-type: lower-alpha;"==d?(p=g.charCodeAt(0)-96,d?"<"+o+c+' start="'+p+'" style = "'+d+"margin-left:"+m+y+';">':"<"+o+">"):d?"<"+o+c+' style = "'+d+";margin-left:"+m+y+';">':"<"+o+' style="margin-left:'+m+y+';">'):"list-style-type: upper-alpha;"==d?(p=g.charCodeAt(0)-64,d?"<"+o+c+' style = "'+d+' start="'+p+'">':"<"+o+">"):"list-style-type: lower-alpha;"==d?(m=g.charCodeAt(0)-96,d?"<"+o+c+' style = "'+d+' start="'+m+'">':"<"+o+">"):d?"<"+o+c+' style = "'+d+'">':"<"+o+">",!1);t;){if(!H(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}var b=N(t);if((r=r||b)<b)f+=(s=e(t,i,b,t.style.marginLeft)).el.outerHTML,t=s.currentNode;else{if(b<r)break;t.firstElementChild&&t.firstElementChild.firstElementChild&&t.firstElementChild.firstElementChild.firstChild&&(u.lastIndex=0),a&&a.firstElementChild&&a.firstElementChild.firstElementChild&&a.firstElementChild.firstElementChild.firstChild&&(u.lastIndex=0,l=u.test(a.firstElementChild.firstElementChild.firstChild.data||a.firstElementChild.firstElementChild.firstChild.firstChild&&a.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var v=!1;if((!n&&!t.style.marginLeft||n&&t.style.marginLeft&&n===t.style.marginLeft)&&(v=!0),n=t.style.marginLeft,v||void 0===l?(v=x(t,i),!t.nextSibling||null==t.nextSibling.innerText||null==t.nextSibling.innerText||f.includes('class="decimal_type"')||isNaN(parseInt(t.nextSibling.innerText.trim().split(".")[1],10))||(f=f.substring(3,0)+' class="decimal_type"'+f.substring(3,f.length)),f+="<li>"+v+"</li>"):(1==b&&(f+="</"+o+">",h=!0,a=null),f+=(s=e(t,i,b,t.style.marginLeft)).el.outerHTML,t=s.currentNode),(v=t&&t.nextElementSibling)&&(a=v.previousElementSibling),t&&!H(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}t&&t.parentNode&&t.parentNode.removeChild(t),t=v}}h||(f+="</"+o+">");var y=document.createElement("div");return y.innerHTML=f,{el:y,currentNode:t}}(e,o).el,r=null,(r=n?n.nextSibling:t.firstChild)?t.insertBefore(i,r):t.appendChild(i),!1):m(e="FONT"===e.tagName&&(a&&"LibreOffice"===a[0]||o["."+e.getAttribute("class")])?O(e,"span"):e,o);if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var l=e.nextSibling;l;)(l=e.nextSibling)&&L(l),l.data&&-1<l.data.indexOf("[endif]")&&(l=null);-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")&&((n=document.createElement("input")).type="checkbox",e.parentNode.insertBefore(n,e.nextSibling)),L(e)}return!1}),u(e,function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var i=e.parentNode;i&&(L(e),!(e=i).innerHTML)&&"TD"!==e.parentNode.tagName;)i=e.parentNode;return!1}var r=e,t=r.getAttribute("style");if(t){(t=P(t))&&";"!==t.slice(-1)&&(t+=";");var n=t.match(/(^|\S+?):.+?;{1,1}/gi);if(n){for(var l={},a=0;a<n.length;a++){var s=n[a].split(":");2!==s.length||"text-align"===s[0]&&"SPAN"===r.tagName||(l[s[0]]=s[1])}var o,d="";for(o in l)if(l.hasOwnProperty(o)){if("font-size"===o&&"pt;"===l[o].slice(-3)){var g,f=null;try{f=parseFloat(l[o].slice(0,-3),10)}catch(e){f=null}f&&("px"===(g=M.opts.fontSizeUnit)?(f=Math.round(1.33*f),l[o]=f+"px;"):"pt"===g&&(f=Math.round(f),l[o]=f+"pt;"))}d+=o+":"+l[o]}d&&r.setAttribute("style",d)}}}return!0}),u(e,function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0});s=e.outerHTML,e=M.opts.htmlAllowedStyleProps;return M.opts.htmlAllowedStyleProps=M.opts.wordAllowedStyleProps,s=M.clean.html(s,M.opts.wordDeniedTags,M.opts.wordDeniedAttrs,!1),M.opts.htmlAllowedStyleProps=e,s}return{_init:function(){M.events.on("paste.wordPaste",function(e){var t;return r=e,M.opts.wordPasteModal?(i||(e='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+M.language.translate("Word Paste Detected")+"</h4>",t=function(){var e='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return e=(e+='<p style="text-align: left;">'+M.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>")+'<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+M.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+M.language.translate("Keep")+"</button></div></div>"}(),e=M.modals.create(n,e,t),t=e.$body,i=e.$modal,e.$modal.addClass("fr-middle"),M.events.bindClick(t,"button.fr-remove-word",function(){(i.data("instance")||M).wordPaste.clean()}),M.events.bindClick(t,"button.fr-keep-word",function(){(i.data("instance")||M).wordPaste.clean(!0)}),M.events.$on(l(M.o_win),"resize",function(){M.modals.resize(n)})),M.modals.show(n),M.modals.resize(n)):a(M.opts.wordPasteKeepFormatting),!1})},clean:a,_wordClean:o}}});
//# sourceMappingURL=word_paste.min.js.map