package assets var CpWysiwygPellJs = []byte(`!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.pell={})}(this,function(t){"use strict";var e=Object.assign||function(t){for(var e=1;eB",title:"Bold",state:function(){return n("bold")},result:function(){return f("bold")}},italic:{icon:"I",title:"Italic",state:function(){return n("italic")},result:function(){return f("italic")}},underline:{icon:"U",title:"Underline",state:function(){return n("underline")},result:function(){return f("underline")}},strikethrough:{icon:"S",title:"Strike-through",state:function(){return n("strikeThrough")},result:function(){return f("strikeThrough")}},heading1:{icon:"H1",title:"Heading 1",result:function(){return f(l,"

")}},heading2:{icon:"H2",title:"Heading 2",result:function(){return f(l,"

")}},paragraph:{icon:"¶",title:"Paragraph",result:function(){return f(l,"

")}},quote:{icon:"“ ”",title:"Quote",result:function(){return f(l,"

")}},olist:{icon:"#",title:"Ordered List",result:function(){return f("insertOrderedList")}},ulist:{icon:"•",title:"Unordered List",result:function(){return f("insertUnorderedList")}},code:{icon:"</>",title:"Code",result:function(){return f(l,"
")}},line:{icon:"―",title:"Horizontal Line",result:function(){return f("insertHorizontalRule")}},link:{icon:"🔗",title:"Link",result:function(){var t=window.prompt("Enter the link URL");t&&f("createLink",t)}},image:{icon:"📷",title:"Image",result:function(){var t=window.prompt("Enter the image URL");t&&f("insertImage",t)}}},m={actionbar:"pell-actionbar",button:"pell-button",content:"pell-content",selected:"pell-button-selected"},r=function(r){var t=r.actions?r.actions.map(function(t){return"string"==typeof t?p[t]:p[t.name]?e({},p[t.name],t):t}):Object.keys(p).map(function(t){return p[t]}),i=e({},m,r.classes),n=r[c]||"div",o=d("div");o.className=i.actionbar,s(r.element,o);var u=r.element.content=d("div");return u.contentEditable=!0,u.className=i.content,u.oninput=function(t){var e=t.target.firstChild;e&&3===e.nodeType?f(l,"<"+n+">"):"
"===u.innerHTML&&(u.innerHTML=""),r.onChange(u.innerHTML)},u.onkeydown=function(t){var e;"Enter"===t.key&&"blockquote"===(e=l,document.queryCommandValue(e))&&setTimeout(function(){return f(l,"<"+n+">")},0)},s(r.element,u),t.forEach(function(t){var e=d("button");if(e.className=i.button,e.innerHTML=t.icon,e.title=t.title,e.setAttribute("type","button"),e.onclick=function(){return t.result(r.element,u,this)&&u.focus()},t.state){var n=function(){return e.classList[t.state()?"add":"remove"](i.selected)};a(u,"keyup",n),a(u,"mouseup",n),a(e,"click",n)}s(o,e)}),r.styleWithCSS&&f("styleWithCSS"),f(c,n),r.element},i={exec:f,init:r};t.exec=f,t.init=r,t.default=i,Object.defineProperty(t,"__esModule",{value:!0})});`)