UNPKG

jodit-pro

Version:

PRO Version of Jodit Editor

14 lines 4.86 kB
/*! * jodit-pro - PRO Version of Jodit Editor * Author: Chupurnov Valerii <chupurnov@gmail.com> * Version: v4.9.27 * Url: https://xdsoft.net/jodit/pro/ * License(s): SEE LICENSE IN LICENSE.md */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var n in o)("object"==typeof exports?exports:t)[n]=o[n]}}(self,function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[314],{12324:function(t,e,o){"use strict";var n=o(6441);n.Config.prototype.showBlocks={enable:!1,color:"#ccc",tagList:["html","body","div","span","applet","object","iframe","h1","h2","h3","h4","h5","h6","p","blockquote","pre","a","abbr","acronym","address","big","cite","code","del","dfn","em","img","ins","kbd","q","s","samp","small","strike","strong","sub","sup","tt","var","b","u","i","center","dl","dt","dd","fieldset","form","label","legend","caption","th","td","li","ol","ul","article","aside","canvas","details","embed","figure","figcaption","footer","header","hgroup","menu","nav","output","ruby","section","summary","time","mark","audio","video"]},n.Config.prototype.controls.showBlocks={isActive:t=>!!t.e.fire("showBlocksEnabled"),tooltip:"Show Blocks",command:"toggleShowBlocks"}},45198:function(t,e,o){"use strict";o.r(e),o.d(e,{ar:function(){return i.a},cs_cz:function(){return i.a},de:function(){return i.a},es:function(){return i.a},fa:function(){return i.a},fr:function(){return i.a},he:function(){return i.a},hu:function(){return i.a},id:function(){return i.a},it:function(){return i.a},ja:function(){return i.a},ko:function(){return i.a},nl:function(){return i.a},pl:function(){return i.a},pt_br:function(){return i.a},ru:function(){return i.a},tr:function(){return i.a},zh_cn:function(){return i.a},zh_tw:function(){return i.a}});var n=o(41324),i=o.n(n)},47682:function(t,e,o){"use strict";o.r(e),o.d(e,{showBlocks:function(){return p}});var n=o(82749),i=o(31635);o(12324);var r=o(45198),s=o(78879),a=o.n(s),l=o(65478),u=o(2748),c=o(580),d=o(50911),h=o(12153),f=o(2692);class p extends d.Plugin{get style(){return(0,c.getContainer)(this.jodit,p,"style",!0)}enable(){this.isEnabled=!0;let t=this.j.o.iframe?"body":".jodit-wysiwyg",{tagList:e,color:o}=this.j.o.showBlocks;this.style.innerHTML=e.map(e=>`${t} ${e}{ outline: 1px dashed ${o}; background-image: url("${"data:image/svg+xml;utf8,"+escape('<svg xmlns="http://www.w3.org/2000/svg" width="50px"><text dominant-baseline="hanging" text-anchor="end" style="fill: '+o+';font: 10px sans-serif" x="50px" y="0">'+e+"</text></svg>")}"); background-position: top 2px ${"rtl"===this.j.o.direction?"left":"right"} 4px; background-repeat: no-repeat; position: relative; }`).join("")}disable(){this.isEnabled=!1;let t=(0,l.cached)(this,"style");t&&(t.innerHTML="")}toggle(){this.isEnabled?this.disable():this.enable(),this.j.e.fire("updateToolbar")}afterInit(t){t.e.on("showBlocksEnabled",()=>this.isEnabled),t.registerCommand("enableShowBlocks",this.enable).registerCommand("disableShowBlocks",this.disable).registerCommand("toggleShowBlocks",this.toggle),this.j.o.showBlocks.enable&&this.enable()}beforeDestruct(t){this.disable(),u.Dom.safeRemove((0,l.cached)(this,"style"))}constructor(t){super(t),(0,n._)(this,"buttons",[{name:"showBlocks",group:"state"}]),(0,n._)(this,"isEnabled",!1),(0,c.extendLang)(r),h.Icon.set("showBlocks",a())}}(0,n._)(p,"requires",["license"]),(0,i.__decorate)([l.cache],p.prototype,"style",null),(0,i.__decorate)([l.autobind],p.prototype,"enable",null),(0,i.__decorate)([l.autobind],p.prototype,"disable",null),(0,i.__decorate)([l.autobind],p.prototype,"toggle",null),f.JoditPro.plugins.add("show-blocks",p)},78879:function(t){t.exports='<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <g> <rect rx="10" height="1620" width="1620" y="79.646973" x="80" stroke-width="100" stroke-dasharray="8% 10%" fill="none"/> <path d="m1333.992706,381.692384l0,52.982419q0,21.04781 -12.98052,44.272981t-29.820114,23.22517q-35.082487,0 -37.889085,0.725787q-18.242893,4.354719 -22.452791,22.499384q-2.104949,7.983652 -2.104949,46.45034l0,836.106125q0,18.144664 -12.629695,31.208822t-30.170938,13.064158l-75.778171,0q-17.541243,0 -30.170938,-13.064158t-12.629695,-31.208822l0,-884.008038l-100.335911,0l0,884.008038q0,18.144664 -12.27887,31.208822t-30.521763,13.064158l-75.778171,0q-18.242893,0 -30.521763,-13.064158t-12.27887,-31.208822l0,-359.990137q-103.14251,-8.709439 -171.904184,-42.821407q-88.407866,-42.095621 -134.716748,-129.915795q-44.905583,-84.917028 -44.905583,-187.978721q0,-120.48057 61.745176,-207.574958q61.745176,-85.642815 146.644794,-115.400064q77.88312,-26.854103 292.587937,-26.854103l336.090221,0q17.541243,0 30.170938,13.064158t12.629695,31.208822z"/> </g> </svg>'}},function(t){return t(t.s=47682)}])});