text: /**
   *   MediumButton  1.1 (08.08.2014)
   *   By Patrick Stillhart
   *   https://stillhart.biz/
   */
  function MediumButton(t){return void 0!==t.label&&/\S{1}/.test(t.label)&&void 0!==t.start&&/\S{1}/.test(t.start)&&void 0!==t.end&&/\S{1}/.test(t.end)||void 0!==t.label&&/\S{1}/.test(t.label)&&void 0!==t.action&&/\S{1}/.test(t.action)?(t.start=void 0===t.start?"":t.start,t.end=void 0===t.end?"":t.end,this.options=t,this.button=document.createElement("button"),this.button.className="medium-editor-action",this.button.innerHTML=t.label,void(this.button.onclick=function(){var e=getCurrentSelection(),n=window.getSelection();void 0===t.start||-1==e.indexOf(t.start)&&-1==e.indexOf(t.end)?(void 0!=t.action&&(e=t.action(e,!0)),e=t.start+e+t.end):(void 0!=t.action&&(e=t.action(e,!1)),e=String(e).split(t.start).join(""),e=String(e).split(t.end).join(""));var o;if(n.getRangeAt&&n.rangeCount){if(o=window.getSelection().getRangeAt(0),o.deleteContents(),o.createContextualFragment)fragment=o.createContextualFragment(e);else{var i=document.createElement("div");for(i.innerHTML=e,fragment=document.createDocumentFragment();child=i.firstChild;)fragment.appendChild(child)}var a=fragment.firstChild,r=fragment.lastChild;o.insertNode(fragment),a&&(o.setStartBefore(a),o.setEndAfter(r)),n.removeAllRanges(),n.addRange(o)}})):void console.error('[Custom-Button] You need to specify "label", "start" and "end" OR "label" and "action"')}function getCurrentSelection(){var t,e="";if("undefined"!=typeof window.getSelection){if(t=window.getSelection(),t.rangeCount){for(var n=document.createElement("div"),o=0,i=t.rangeCount;i>o;++o)n.appendChild(t.getRangeAt(o).cloneContents());e=n.innerHTML}}else"undefined"!=typeof document.selection&&"Text"==document.selection.type&&(e=document.selection.createRange().htmlText);return e}MediumButton.prototype.getButton=function(){return this.button},MediumButton.prototype.checkState=function(){var t=getCurrentSelection();""!=this.options.start&&t.indexOf(this.options.start)>-1&&t.indexOf(this.options.end)>-1&&this.button.classList.add("medium-editor-button-active")};