From: woltlab.com Date: Wed, 8 Jul 2015 10:02:19 +0000 (+0200) Subject: Updating minified JavaScript files X-Git-Tag: 3.0.0_Beta_1~2208 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d927e75269eaf908da27d95d27a45dae0ee31564;p=GitHub%2FWoltLab%2FWCF.git Updating minified JavaScript files --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js index 49522ca3a2..eba48b626a 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -2,11 +2,10 @@ if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.table=function(){return{getTemplate:function(){return String()+'
'},init:function(){var t={};t.insert_table={title:this.lang.get("insert_table"),func:this.table.show},t.insert_row_above={title:this.lang.get("insert_row_above"),func:this.table.addRowAbove},t.insert_row_below={title:this.lang.get("insert_row_below"),func:this.table.addRowBelow},t.insert_column_left={title:this.lang.get("insert_column_left"),func:this.table.addColumnLeft},t.insert_column_right={title:this.lang.get("insert_column_right"),func:this.table.addColumnRight},t.add_head={title:this.lang.get("add_head"),func:this.table.addHead},t.delete_head={title:this.lang.get("delete_head"),func:this.table.deleteHead},t.delete_column={title:this.lang.get("delete_column"),func:this.table.deleteColumn},t.delete_row={title:this.lang.get("delete_row"),func:this.table.deleteRow},t.delete_table={title:this.lang.get("delete_table"),func:this.table.deleteTable},this.observe.addButton("td","table"),this.observe.addButton("th","table");var e=this.button.addBefore("link","table",this.lang.get("table"));this.button.addDropdown(e,t)},show:function(){this.modal.addTemplate("table",this.table.getTemplate()),this.modal.load("table",this.lang.get("insert_table"),300),this.modal.createCancelButton();var t=this.modal.createActionButton(this.lang.get("insert"));t.on("click",this.table.insert),this.selection.save(),this.modal.show(),$("#redactor-table-rows").focus()},insert:function(){var t,e,i,a,s=$("#redactor-table-rows").val(),l=$("#redactor-table-columns").val(),n=$("
"),r=Math.floor(99999*Math.random()),o=$('
');for(t=0;s>t;t++){for(e=$(""),i=0;l>i;i++)a=$(""+this.opts.invisibleSpace+""),0===t&&0===i&&a.append(this.selection.getMarker()),$(e).append(a);o.append(e)}n.append(o);var d=n.html();if(this.modal.close(),this.selection.restore(),!this.table.getTable()){this.buffer.set();var h=this.selection.getBlock()||this.selection.getCurrent();h&&"BODY"!=h.tagName?("LI"==h.tagName&&(h=$(h).closest("ul, ol")),$(h).after(d)):this.insert.html(d),this.selection.restore();var c=this.$editor.find("#table"+r);if(!this.opts.linebreaks&&(this.utils.browser("mozilla")||this.utils.browser("msie"))){var b=c.next();0===b.length&&c.after(this.opts.emptyHtml)}this.observe.buttons(),c.find("span.redactor-selection-marker").remove(),c.removeAttr("id"),this.code.sync(),this.core.setCallback("insertedTable",c)}},getTable:function(){var t=$(this.selection.getParent()).closest("table");return this.utils.isRedactorParent(t)?0===t.size()?!1:t:!1},restoreAfterDelete:function(t){this.selection.restore(),t.find("span.redactor-selection-marker").remove(),this.code.sync()},deleteTable:function(){var t=this.table.getTable();if(t){this.buffer.set();var e=t.next();this.opts.linebreaks||0===e.length?this.caret.setAfter(t):this.caret.setStart(e),t.remove(),this.code.sync()}},deleteRow:function(){var t=this.table.getTable();if(t){var e=$(this.selection.getCurrent());this.buffer.set();var i=e.closest("tr"),a=i.prev().length?i.prev():i.next();if(a.length){var s=a.children("td, th").first();s.length&&s.prepend(this.selection.getMarker())}i.remove(),this.table.restoreAfterDelete(t)}},deleteColumn:function(){var t=this.table.getTable();if(t){this.buffer.set();var e=$(this.selection.getCurrent()),i=e.closest("td, th"),a=i[0].cellIndex;t.find("tr").each($.proxy(function(t,e){var i=$(e),s=0>a-1?a+1:a-1;0===t&&i.find("td, th").eq(s).prepend(this.selection.getMarker()),i.find("td, th").eq(a).remove()},this)),this.table.restoreAfterDelete(t)}},addHead:function(){var t=this.table.getTable();if(t){if(this.buffer.set(),0!==t.find("thead").size())return void this.table.deleteHead();var e=t.find("tr").first().clone();e.find("td").html(this.opts.invisibleSpace),$thead=$("").append(e),t.prepend($thead),this.code.sync()}},deleteHead:function(){var t=this.table.getTable();if(t){var e=t.find("thead");0!==e.size()&&(this.buffer.set(),e.remove(),this.code.sync())}},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(t){var e=this.table.getTable();if(e){this.buffer.set();var i=$(this.selection.getCurrent()),a=i.closest("tr"),s=a.clone();s.find("th").replaceWith(function(){var t=$("");return t[0].attributes=this.attributes,t.append($(this).contents())}),s.find("td").html(this.opts.invisibleSpace),"after"==t?a.after(s):a.before(s),this.code.sync()}},addColumn:function(t){var e=this.table.getTable();if(e){var i=0,a=$(this.selection.getCurrent());this.buffer.set();var s=a.closest("tr"),l=a.closest("td, th");s.find("td, th").each($.proxy(function(t,e){$(e)[0]===l[0]&&(i=t)},this)),e.find("tr").each($.proxy(function(e,a){var s=$(a).find("td, th").eq(i),l=s.clone();l.html(this.opts.invisibleSpace),"after"==t?s.after(l):s.before(l)},this)),this.code.sync()}}}}; // wbbcode.js -if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wbbcode=function(){"use strict";var e=!1;return{init:function(){var t=this.$textarea.wcfIdentify();this.opts.initCallback=function(){$.browser.msie&&this.$editor.addClass("msie");var e=$.trim(this.wutil.getOption("woltlab.originalValue"));e.length&&(this.wutil.replaceText(e),this.wutil.selectionEndOfEditor()),delete this.opts.woltlab.originalValue,$(document).trigger("resize"),this.wutil.saveSelection()}.bind(this),this.opts.pasteBeforeCallback=$.proxy(this.wbbcode._pasteBeforeCallback,this),this.opts.pasteCallback=$.proxy(this.wbbcode._pasteCallback,this);var i=this.clean.onSync;this.clean.onSync=function(t){return t=t.replace(/\u200C/g,"__wcf_zwnj__"),t=t.replace(/\u200D/g,"__wcf_zwj__"),e===!0?e=!1:t=t.replace(/

]+)?><\/p>/g,"

@@@wcf_empty_line@@@

"),t=i.call(this,t),t=t.replace(/__wcf_zwnj__/g,"‌"),t.replace(/__wcf_zwj__/g,"‍")}.bind(this),this.wutil.getOption("woltlab.autosaveOnce")&&(this.wutil.saveTextToStorage(),delete this.opts.woltlab.autosaveOnce);var a=this.button.get("table");if(a.length){var r=a.data("dropdown");r.find(".redactor-dropdown-add_head").parent().remove(),r.find(".redactor-dropdown-delete_head").parent().remove(),$('"}return'

"+__REDACTOR_CODE_HIGHLIGHTERS[a]+(n?": "+WCF.String.escapeHTML(n):"")+'

    '+d+"
"}.bind(this)),e=e.replace(O,B)}return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:e}),e},_expandFormatting:function(e,t,i){if(!e.length)return t+this.opts.invisibleSpace+i;var a=e.indexOf("[/td]");if(-1!==a){var r=e.substring(0,a);if(-1===r.indexOf("[td]"))return t+r+i+e.substring(a)}var r=e.split("\n");e="";for(var n=0,l=r.length;l>n;n++){var o=r[n];0===o.length&&(o=this.opts.invisibleSpace),e.length&&(e+="\n"),e+=t+o+i}return e},_pasteBeforeCallback:function(e){var t={1:24,2:22,3:18,4:14,5:12,6:10};return e=e.replace(/]*)>/g,function(e,i,a){if(a&&a.match(/style="([^"]+?)"/)&&/font-size: ?(\d+|\d+\.\d+)(px|pt|em|rem|%)/.test(RegExp.$1)){var r=$('
').appendTo(document.body),n=parseInt(r[0].clientWidth);r.remove();var l=-1,o=!1;$.each(t,function(e,i){-1===l?l=e:Math.abs(n-i)l?parseInt(l)+1:l),i=l}return"[size="+t[i]+"]"}),e=e.replace(/<\/h[1-6]>/g,"[/size]"),e=e.replace(/<(article|header)[^>]+>/g,"
"),e=e.replace(/<\/(article|header)>/g,"
"),e=e.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"

"),e=e.replace(/<\/(div|p)><\/(div|p)>/g,"

"),e=e.replace(/<(?:div|p|span)[^>]+>/gi,function(e){return e.replace(/ class="[^"]+"/,"")}),e=e.replace(/<\/?wbr[^>]*>/g,""),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:e}),e},_pasteCallback:function(e){return e=e.replace(/\[size=(\d+)\]/g,'

'),e=e.replace(/\[\/size\]/g,"

"),e=e.replace(/style="([^"]+)"/,function(e,t){for(var i=t.split(";"),a=[],r=0,n=i.length;n>r;r++){var l=i[r];l.match(/^\s*background-color/)||a.push(l)}return'style="'+a.join(";")+'"'}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:e}),e},insertAttachment:function(e,t){e=parseInt(e);var i=this.wutil.getOption("woltlab.attachment"+(t?"":"Thumbnail")+"Url"),a=this.wbbcode._getImageAttachments();if(i&&void 0!==a[e]){var r="";t&&(r=' style="width: '+a[e].width+"px; max-height: "+a[e].height+"px; max-width: "+a[e].width+'px;"'),this.wutil.insertDynamic('","[attach="+e+(t?",none,"+a[e].width:"")+"][/attach]")}else this.wutil.insertDynamic("[attach="+e+"][/attach]")},removeAttachment:function(e){this.opts.visual&&this.$editor.find("img.redactorEmbeddedAttachment").each(function(t,i){var a=$(i);a.data("attachmentID")==e&&a.remove()})},_getImageAttachments:function(){var e=this.wutil.getOption("woltlab.attachmentImages")||[];if(e.length)return delete this.opts.attachmentImages,e;var t={imageAttachments:{}};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$textarea.wcfIdentify(),t),t.imageAttachments},_keydownCallback:function(e){switch(e.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:case $.ui.keyCode.DOWN:case $.ui.keyCode.ENTER:case $.ui.keyCode.UP:case 83:break;default:return}this.selection.get();var t=this.selection.getCurrent(),i=this.selection.getParent();i=i?$(i):i;var a=i?i.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(e.event.which){case $.ui.keyCode.BACKSPACE:if(this.wutil.isCaret()){var r=!1;if(a.length){for(var n=!0,l=0;lt;t++){var a=this.$editor[0].children[t];if(a.nodeType===Node.ELEMENT_NODE&&"P"===a.tagName&&!(a.textContent.length>0||a.children.length>1||"BR"===a.children[0].tagName)){for(a=a.children[0];1===a.children.length;)a=a.children[0];if(0===a.children.length&&"BR"===a.tagName){var r=a.parentNode,n=document.createTextNode("​");r.appendChild(n),r.removeChild(a)}}}}},observeQuotes:function(){this.$editor.find(".redactorQuoteEdit").off("click.wbbcode").on("click.wbbcode",$.proxy(this.wbbcode._observeQuotesClick,this))},_observeQuotesClick:function(e){var t=$(e.currentTarget).closest("header"),i=$('');$(''+WCF.Language.get("wcf.bbcode.quote.edit")+"").click($.proxy(function(t){t.preventDefault(),this.wbbcode._openQuoteEditOverlay($(e.currentTarget).closest("blockquote.quoteBox"),!1),$(".redactor-link-tooltip").remove()},this)).appendTo(i);var a=t.offset();i.css({left:a.left+"px",top:a.top+20+"px"}),$(".redactor-link-tooltip").remove(),i.appendTo(document.body),this.selection.remove()},observeCodeListings:function(){this.$editor.find(".codeBox").each(function(e,t){var i=$(t),a=i.find(".redactorEditCodeBox");a.length||(a=$('
'+WCF.Language.get("wcf.bbcode.code.edit")+"
").insertAfter(i.find("> div > div > h3"))),a.off("click.wbbcode").on("click.wbbcode",function(){this.wbbcode._handleInsertCode(i,!1)}.bind(this))}.bind(this))},_openQuoteEditOverlay:function(t,i){this.modal.load("quote",WCF.Language.get("wcf.bbcode.quote."+(i?"insert":"edit")),400);var a=this.modal.createActionButton(this.lang.get("save"));i?(this.selection.save(),a.click($.proxy(function(){var t=$("#redactorQuoteAuthor").val(),i=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.selection.restore(),e=!0;var a=this.selection.getHtml();this.utils.isEmpty(a)&&(a="");var r=this.wbbcode.insertQuoteBBCode(t,i,a);null!==r&&(a.length||($.browser.mozilla&&r.children("br[type=_moz]").replaceWith("
"+this.opts.invisibleSpace+"
"),this.caret.setStart(r.children("div")[0]))),this.modal.close()},this))):($("#redactorQuoteAuthor").val(t.data("author")),$("#redactorQuoteLink").val(WCF.String.unescapeHTML(t.attr("cite"))),a.click($.proxy(function(){var e=$("#redactorQuoteAuthor").val();t.data("author",e),t.attr("data-author",e),t.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val())),this.wbbcode._updateQuoteHeader(t),this.modal.close()},this))),this.modal.show()},_updateQuoteHeader:function(e){var t=e.data("author"),i=e.attr("cite"); -i&&(i=WCF.String.escapeHTML(i)),e.find("> header > h3").empty().append(this.wbbcode._buildQuoteHeader(t,i))},insertQuoteBBCode:function(e,t,i,a){var r="[quote]",n="[/quote]";e&&(r=t?"[quote='"+e+"','"+t+"']":"[quote='"+e+"']");var l=null;if(this.wutil.inWysiwygMode()){var o=WCF.getUUID(),c="";a?c=this.wbbcode.convertToHtml(r+a+n):(c=this.wbbcode.convertToHtml(r+o+n),c=c.replace(o,i.replace(/^

/,"").replace(/<\/p>$/,""))),c=c.replace(/^

/,"").replace(/<\/p>$/,""),c=c.replace(/

div");if(1==h.length)""===h[0].innerHTML&&(h[0].innerHTML=this.opts.invisibleSpace);else if($.browser.mozilla){var g=l.find("> div > br[type=_moz]");g.length&&($("
"+this.opts.invisibleSpace+"
").insertBefore(g),g.remove())}l.removeAttr("id"),this.wutil.setCaretAfter(l[0]);var u=l[0].previousElementSibling;null!==u&&"P"===u.nodeName&&"​"===u.innerHTML&&(u=u.previousElementSibling,null===u||"P"!==u.nodeName||"​"!==u.innerHTML&&"
"!==u.innerHTML||u.parentNode.removeChild(u.nextElementSibling))}this.wbbcode.observeQuotes(),this.wbbcode.fixBlockLevelElements(),this.$toolbar.find("a.re-__wcf_quote").removeClass("redactor-button-disabled")}else this.wutil.insertAtCaret(r+a+n);return this.wutil.saveSelection(),l},_buildQuoteHeader:function(e,t){var i="";return!e&&t&&(e=t,t=""),e?(t&&(i+=''),i+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(e)}),t&&(i+="")):i=""+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+"",i},_handleInsertQuote:function(){this.wbbcode._openQuoteEditOverlay(null,!0)},_handleInsertCode:function(e,t){this.modal.load("code",WCF.Language.get("wcf.bbcode.code."+(t?"insert":"edit")),400);var i=this.modal.createActionButton(this.lang.get("save")).addClass("buttonPrimary");if(t){this.selection.get();var a=this.selection.getText();this.selection.save(),this.modal.show();var r=$("#redactorCodeBox").focus();r.val(a),i.click($.proxy(function(){var e=$("#redactorCodeBox"),t=$("#redactorCodeFilename"),i=$("#redactorCodeHighlighter"),a=$("#redactorCodeLineNumber"),r=e.val().replace(/^\n+/,"").replace(/\n+$/,"");if(0===$.trim(r).length)return void(e.next("small.innerError").length||$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(e));var n=$.trim(t.val().replace(/['"]/g,"")),l="[code="+i.val()+","+a.val()+(n.length?",'"+n+"'":"")+"]";l.match(/\[code=([^,]+),(\d+)\]/)&&(l="[code="+RegExp.$2+","+RegExp.$1+"]"),l+=r,l+="[/code]",this.wutil.adjustSelectionForBlockElement(),this.wutil.saveSelection();var o=this.wbbcode.convertToHtml(l);this.buffer.set(),this.insert.html(o,!1);var e=this.$editor.find(".codeBox:not(.jsRedactorCodeBox)");this.wbbcode.observeCodeListings(),this.wbbcode.fixBlockLevelElements(),e.attr("contenteditable","false"),this.wutil.setCaretAfter(e[0]),this.modal.close()},this))}else{var n=this.modal.createActionButton(WCF.Language.get("wcf.global.button.delete"));n.click(function(){this.buffer.set(),e.remove(),this.modal.close()}.bind(this)),this.modal.show();var r=$("#redactorCodeBox").focus(),l=$("#redactorCodeFilename"),o=$("#redactorCodeHighlighter"),c=$("#redactorCodeLineNumber");o.val(e.data("highlighter")),l.val(e.data("filename")||"");var s=e.find("> div > ol");c.val(parseInt(s.prop("start")));var d="";s.children("li").each(function(e,t){d+=$(t).text().replace(/^\u200b$/,"")+"\n"}),r.val(d.replace(/^\n+/,"").replace(/\n+$/,"")),i.click($.proxy(function(){var t=r.val().replace(/^\n+/,"").replace(/\n+$/,"");if(0===$.trim(t).length)return void(r.next("small.innerError").length||$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(r));var i=o.val();e.data("highlighter",i),e.attr("data-highlighter",i);var a=__REDACTOR_CODE_HIGHLIGHTERS[i],n=$.trim(l.val().replace(/['"]/g,""));n?(a+=": "+WCF.String.escapeHTML(n),e.data("filename",n),e.attr("data-filename",n)):(e.removeAttr("data-filename"),e.removeData("filename")),e.data("highlighter",o.val()),e.find("> div > div > h3").html(a);var s=e.find("> div > ol").empty(),d=parseInt(c.val());s.prop("start",d>1?d:1),t=t.split("\n");for(var p="",h=0;h"+WCF.String.escapeHTML(t[h])+"";s.append($(p)),this.modal.close()},this))}},fixBlockLevelElements:function(){var e=function(e,t){var i=e[t];i&&i.nodeType===Node.ELEMENT_NODE&&"P"===i.tagName&&(i.innerHTML.length||i.parentElement.removeChild(i))}.bind(this);this.$editor.find("blockquote, .codeBox").each(function(){e(this,"previousElementSibling"),e(this,"nextElementSibling")})},fixFormatting:function(e){for(var t=function(e){e.style.removeProperty("text-align");for(var i=0;i]+)?><\/p>/g,"

@@@wcf_empty_line@@@

"),t=i.call(this,t),t=t.replace(/__wcf_zwnj__/g,"‌"),t.replace(/__wcf_zwj__/g,"‍")}.bind(this),this.wutil.getOption("woltlab.autosaveOnce")&&(this.wutil.saveTextToStorage(),delete this.opts.woltlab.autosaveOnce);var a=this.button.get("table");if(a.length){var o=a.data("dropdown");o.find(".redactor-dropdown-add_head").parent().remove(),o.find(".redactor-dropdown-delete_head").parent().remove(),$('";c.append($(h)),this.modal.close()},this))}},fixBlockLevelElements:function(){return},fixFormatting:function(e){for(var t=function(e){e.style.removeProperty("text-align");for(var i=0;it;t++)this.wbutton._addBBCodeButton(__REDACTOR_BUTTONS[t]);for(var n={html:"fa-square-o",bold:"fa-bold",italic:"fa-italic",underline:"fa-underline",deleted:"fa-strikethrough",subscript:"fa-subscript",superscript:"fa-superscript",orderedlist:"fa-list-ol",unorderedlist:"fa-list-ul",outdent:"fa-outdent",indent:"fa-indent",link:"fa-link",alignment:"fa-align-left",table:"fa-table"},a={fontcolor:WCF.Language.get("wcf.bbcode.button.fontColor"),fontfamily:WCF.Language.get("wcf.bbcode.button.fontFamily"),fontsize:WCF.Language.get("wcf.bbcode.button.fontSize"),image:WCF.Language.get("wcf.bbcode.button.image"),subscript:WCF.Language.get("wcf.bbcode.button.subscript"),superscript:WCF.Language.get("wcf.bbcode.button.superscript")},i=this.wutil.getOption("buttons"),o="",t=0,e=i.length;e>t;t++){var s=i[t];if("separator"!=s){var r=this.button.get(s);r.length?(n[s]&&this.button.setAwesome(s,n[s]),"table"===s&&o&&r.parent().insertAfter(this.button.get(o).parent())):this.wbutton._addCoreButton(s,a[s]?a[s]:null,n[s]?n[s]:null,o),o=s}else this.button.get(o).parent().addClass("separator")}this.button.addCallback(this.button.get("image"),$.proxy(this.wbutton.insertImage,this));var l=this.button.addAfter("html","undo",WCF.Language.get("wcf.bbcode.button.undo")),u=this.button.addAfter("undo","redo",WCF.Language.get("wcf.bbcode.button.redo"));this.button.addCallback(l,this.buffer.undo),this.button.addCallback(u,this.buffer.redo),u.parent().addClass("separator")},_addCoreButton:function(t,e,n,a){var i={title:null===e?t:e};("subscript"===t||"superscript"===t)&&(i.command=t);var o=this.button.build(t,i);$("
  • ").append(o).insertAfter(this.button.get(a).parent()),null!==n&&this.button.setAwesome(t,n)},_addBBCodeButton:function(t){var e="__wcf_"+t.name,n=this.button.add(e,t.label);this.button.addCallback(n,this.wbutton._insertBBCode),this._bbcodes[e]={name:t.name,voidElement:t.voidElement===!0},t.icon.match(/^fa\-[a-z\-]+$/)?this.button.setAwesome(e,t.icon):n.css("background-image","url("+__REDACTOR_ICON_PATH+t.icon+")")},_insertBBCode:function(t){var e=this._bbcodes[t].name,n={buttonName:t,cancel:!1,redactor:this};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+e+"_"+this.$textarea.wcfIdentify(),n),n.cancel===!1){var a=this.selection.getHtml();if(a=a.replace(/

    @@@wcf_empty_line@@@<\/p>/g,"


    "),this.buffer.set(),this.utils.browser("mozilla")&&!a.length){var i=getSelection().getRangeAt(0).startContainer;i.nodeType===Node.ELEMENT_NODE&&"P"===i.tagName&&"
    "===i.innerHTML&&i.removeChild(i.children[0])}this._bbcodes[t].voidElement?this.insert.html(a+this.selection.getMarkerAsHtml()+"["+e+"]",!1):this.insert.html("["+e+"]"+a+this.selection.getMarkerAsHtml()+"[/"+e+"]",!1),this.selection.restore()}},insertImage:function(){this.image.show()},_insertImage:function(){var t=$("#redactor-image-link-source"),e=t.val().trim();if(e.length){this.buffer.set();var n=$("#redactor-image-align").val(),a="";("left"===n||"right"===n)&&(a=' style="float: '+n+'"'),this.insert.html('",!1),this.modal.close(),this.observe.images()}else t.next("small.innerError")||$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(t)}}}; +if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wbutton=function(){"use strict";return{_bbcodes:{},init:function(){this._bbcodes={};for(var t=0,e=__REDACTOR_BUTTONS.length;e>t;t++)this.wbutton._addBBCodeButton(__REDACTOR_BUTTONS[t]);for(var n={html:"fa-square-o",bold:"fa-bold",italic:"fa-italic",underline:"fa-underline",deleted:"fa-strikethrough",subscript:"fa-subscript",superscript:"fa-superscript",orderedlist:"fa-list-ol",unorderedlist:"fa-list-ul",outdent:"fa-outdent",indent:"fa-indent",link:"fa-link",alignment:"fa-align-left",table:"fa-table"},i={fontcolor:WCF.Language.get("wcf.bbcode.button.fontColor"),fontfamily:WCF.Language.get("wcf.bbcode.button.fontFamily"),fontsize:WCF.Language.get("wcf.bbcode.button.fontSize"),image:WCF.Language.get("wcf.bbcode.button.image"),subscript:WCF.Language.get("wcf.bbcode.button.subscript"),superscript:WCF.Language.get("wcf.bbcode.button.superscript")},a=this.wutil.getOption("buttons"),o="",t=0,e=a.length;e>t;t++){var s=a[t];if("separator"!=s){var r=this.button.get(s);r.length?(n[s]&&this.button.setAwesome(s,n[s]),"table"===s&&o&&r.parent().insertAfter(this.button.get(o).parent())):this.wbutton._addCoreButton(s,i[s]?i[s]:null,n[s]?n[s]:null,o),o=s}else this.button.get(o).parent().addClass("separator")}if(this.button.addCallback(this.button.get("image"),$.proxy(this.wbutton.insertImage,this)),this.utils.isDesktop()){var l=this.button.addAfter("html","undo",WCF.Language.get("wcf.bbcode.button.undo")),u=this.button.addAfter("undo","redo",WCF.Language.get("wcf.bbcode.button.redo"));this.button.addCallback(l,this.buffer.undo),this.button.addCallback(u,this.buffer.redo),u.parent().addClass("separator")}},_addCoreButton:function(t,e,n,i){var a={title:null===e?t:e};("subscript"===t||"superscript"===t)&&(a.command=t);var o=this.button.build(t,a);$("
  • ").append(o).insertAfter(this.button.get(i).parent()),null!==n&&this.button.setAwesome(t,n)},_addBBCodeButton:function(t){var e="__wcf_"+t.name,n=this.button.add(e,t.label);if("tt"===t.name){var i=this.button.build(e,{command:"kbd",title:t.label});$("
  • ").append(i).insertAfter(n.parent()),n.parent().remove(),n=i}else this.button.addCallback(n,this.wbutton._insertBBCode);this._bbcodes[e]={name:t.name,voidElement:t.voidElement===!0},t.icon.match(/^fa\-[a-z\-]+$/)?this.button.setAwesome(e,t.icon):n.css("background-image","url("+__REDACTOR_ICON_PATH+t.icon+")")},_insertBBCode:function(t){var e=this._bbcodes[t].name,n={buttonName:t,cancel:!1,redactor:this};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+e+"_"+this.$textarea.wcfIdentify(),n),n.cancel===!1){var i=this.selection.getHtml();if(i=i.replace(/

    @@@wcf_empty_line@@@<\/p>/g,"


    "),this.buffer.set(),this.utils.browser("mozilla")&&!i.length){var a=getSelection().getRangeAt(0).startContainer;a.nodeType===Node.ELEMENT_NODE&&"P"===a.tagName&&"
    "===a.innerHTML&&a.removeChild(a.children[0])}this._bbcodes[t].voidElement?this.insert.html(i+this.selection.getMarkerAsHtml()+"["+e+"]",!1):this.insert.html("["+e+"]"+i+this.selection.getMarkerAsHtml()+"[/"+e+"]",!1),this.selection.restore()}},insertImage:function(){this.image.show()},_insertImage:function(){var t=$("#redactor-image-link-source"),e=t.val().trim();if(e.length){this.buffer.set();var n=$("#redactor-image-align").val(),i="";("left"===n||"right"===n)&&(i=' style="float: '+n+'"'),this.insert.html('",!1),this.modal.close(),this.observe.images()}else t.next("small.innerError")||$(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(t)}}}; // wfontcolor.js if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontcolor=function(){"use strict";return{init:function(){var o=this.button.addDropdown(this.button.get("fontcolor"));this.wfontcolor._createDropdown(o)},_createDropdown:function(o){for(var F=["#000000","#800000","#8B4513","#2F4F4F","#008080","#000080","#4B0082","#696969","#B22222","#A52A2A","#DAA520","#006400","#40E0D0","#0000CD","#800080","#808080","#FF0000","#FF8C00","#FFD700","#008000","#00FFFF","#0000FF","#EE82EE","#A9A9A9","#FFA07A","#FFA500","#FFFF00","#00FF00","#AFEEEE","#ADD8E6","#DDA0DD","#D3D3D3","#FFF0F5","#FAEBD7","#FFFFE0","#F0FFF0","#F0FFFF","#F0F8FF","#E6E6FA","#FFFFFF"],t=$('
  • '),r=0,n=F.length;n>r;r++){var e=F[r],l=$('').data("color",e).css("background-color",e);t.append(l),l.click($.proxy(this.wfontcolor._onColorPick,this))}var i=$('').html(this.lang.get("none")).data("color","none");i.click($.proxy(this.wfontcolor._onColorPick,this)),t.appendTo(o),$('
  • ")},_onColorPick:function(o){o.preventDefault();var F=$(o.currentTarget).data("color");"none"===F?this.inline.removeStyleRule("color"):this.inline.format("span","style","color: "+F+";")}}}; @@ -18,11 +17,11 @@ if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontfamily=function( if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontsize=function(){"use strict";return{init:function(){var t=this.button.addDropdown(this.button.get("fontsize"));this.wfontsize._createDropdown(t)},_createDropdown:function(t){for(var n=[8,10,12,14,18,24,36],e=this,i=0;i'+o+"
  • ").appendTo(t),r=a.children("a").data("fontSize",o).css("font-size",o+"pt");o>18&&r.css("line-height","1em"),r.click(function(t){t.preventDefault(),e.inline.format("span","style","font-size: "+$(this).data("fontSize")+"pt;")})}$('
  • '+this.opts.curLang.none+"
  • ").appendTo(t);a.children("a").click(function(t){t.preventDefault(),e.inline.removeStyleRule("font-size")})}}}; // wmonkeypatch.js -if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wmonkeypatch=function(){"use strict";return{init:function(){this.wmonkeypatch.alignment(),this.wmonkeypatch.button(),this.wmonkeypatch.caret(),this.wmonkeypatch.clean(),this.wmonkeypatch.code(),this.wmonkeypatch.dropdown(),this.wmonkeypatch.image(),this.wmonkeypatch.indent(),this.wmonkeypatch.inline(),this.wmonkeypatch.insert(),this.wmonkeypatch.keydown(),this.wmonkeypatch.keyup(),this.wmonkeypatch.link(),this.wmonkeypatch.modal(),this.wmonkeypatch.paste(),this.wmonkeypatch.observe(),this.wmonkeypatch.selection(),this.wmonkeypatch.utils(),this.wmonkeypatch.rebuildTemplates(),this.wmonkeypatch.bindEvents(),this.wmonkeypatch.fixWebKit()},bindEvents:function(){var t=this.$textarea.wcfIdentify();this.wutil.setOption("keydownCallback",function(e){var i={cancel:!1,event:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+t,i),i.cancel?!1:!0}),this.wutil.setOption("keyupCallback",function(e){this.wutil.saveSelection();var i={cancel:!1,event:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keyup_"+t,i),i.cancel?!1:!0}.bind(this)),this.opts.activeButtons&&(this.$editor.off("mouseup.redactor keyup.redactor focus.redactor"),this.$editor.on("mouseup.redactor keyup.redactor focus.redactor",$.proxy(this.observe.buttons,this)),this.$editor.on("keyup.redactor",$.proxy(this.keyup.init,this)));var e=!1;this.$editor.on("mousedown.wmonkeypatch",function(){e=!0}.bind(this)),$(document).on("mouseup.wmonkeypatch",function(){e&&(e=!1,this.wutil.saveSelection())}.bind(this));var i=function(t,e){e?!t.previousElementSibling||"P"!==t.previousElementSibling.tagName&&"DIV"!==t.previousElementSibling.tagName?this.wutil.setCaretBefore(t):this.caret.setEnd(t.previousElementSibling):!t.nextElementSibling||"P"!==t.nextElementSibling.tagName&&"DIV"!==t.nextElementSibling.tagName?this.wutil.setCaretAfter(t):this.caret.setEnd(t.nextElementSibling)}.bind(this),n=null;this.$editor.on("click.wmonkeypatch",function(t){if(t.target===this.$editor[0]){var e=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null;if(e&&e.collapsed){var o=e.startContainer,a=this.$editor.offset();if(null===n&&(n={left:this.$editor.cssAsNumber("padding-left"),top:this.$editor.cssAsNumber("padding-top")}),t.pageY<=a.top+n.top){var s=this.$editor[0].children[0];if("BLOCKQUOTE"!==s.tagName&&("DIV"!==s.tagName||!/\bcodeBox\b/.test(s.className)))return}else{if(t.pageX<=a.left+n.left)return;if(t.pageX>a.left+this.$editor.width())return}for(;o&&o!==this.$editor[0];){if(o.nodeType===Node.ELEMENT_NODE&&("BLOCKQUOTE"===o.tagName||"DIV"===o.tagName&&/\bcodeBox\b/.test(o.className))){var r=$(o).offset();return t.pageY<=r.top?i(o,!0):i(o,!1),!1}o=o.parentElement}}var l=this.$editor.children("blockquote, div.codeBox");return l.each(function(e,n){var o=$(n),a=o.offset();if(t.pageY<=a.top)return i(n,!0),!1;var s=o.outerHeight()+(parseInt(o.css("margin-bottom"),10)||0);return t.pageY<=a.top+s?(i(n,!1),!1):void 0}),!1}if("LI"===t.target.tagName){var e=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null,d=!1;if(null!==e){if(!e.collapsed)return;for(var o=e.startContainer;null!==o&&o!==this.$editor[0];){if("LI"===o.tagName){d=!0;break}o=o.parentElement}}if(!d||null===e){var c=document.createTextNode("​"),s=t.target.children[0];s.appendChild(c),this.caret.setEnd(s)}}else if("BLOCKQUOTE"===t.target.tagName){var e=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null;if(null!==e&&e.collapsed){for(var h=null,o=e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentElement:e.startContainer;null!==o&&o!==this.$editor[0];){if("BLOCKQUOTE"===o.tagName){h=o;break}o=o.parentElement}null!==h&&h!==t.target&&(t.pageY<=$(h).offset().top?i(h,!0):i(h,!1))}}}.bind(this))},alignment:function(){var t=this.alignment.setBlocks;this.alignment.setBlocks=function(e){t.call(this,e),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","fixFormatting_"+this.$textarea.wcfIdentify())}.bind(this)},button:function(){var t=this.button.addDropdown;this.button.addDropdown=function(e,i){var n=t.call(this,e,i);return i||n.addClass("dropdownMenu"),n}.bind(this)},caret:function(){this.caret.set=function(t,e,i,n){if(this.utils.browser("msie")||(this.utils.isMobile()&&this.utils.browser("webkit")&&navigator.userAgent.match(/(iPad|iPhone|iPod)/i)?document.activeElement!==this.$editor[0]&&this.$editor.focus():this.$editor.focus()),t=t[0]||t,i=i[0]||i,this.utils.isBlockTag(t.tagName)&&""===t.innerHTML&&(t.innerHTML=this.opts.invisibleSpace),"BR"==t.tagName&&this.opts.linebreaks===!1){var o=$(this.opts.emptyHtml)[0];$(t).replaceWith(o),t=o,i=t}this.selection.get();try{this.range.setStart(t,e),this.range.setEnd(i,n)}catch(t){}this.selection.addRange()}.bind(this),this.caret.setOffset=function(t,e){"undefined"==typeof e&&(e=t),this.focus.isFocused()||this.focus.setStart();for(var i,n=document.createRange(),o=document.getSelection(),a=0,s=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);i=s.nextNode();)if(a+=i.nodeValue.length,(a>t||t===e&&a===t)&&(n.setStart(i,i.nodeValue.length+t-a),t=1/0),a>=e){n.setEnd(i,i.nodeValue.length+e-a);break}o.removeAllRanges(),o.addRange(n)}.bind(this)},clean:function(){var t=function(t){return t=t.replace(/\u201D/g,"__wcf_preserve_character_1__"),t=t.replace(/\u201C/g,"__wcf_preserve_character_2__"),t=t.replace(/\u2018/g,"__wcf_preserve_character_3__"),t=t.replace(/\u2019/g,"__wcf_preserve_character_4__")},e=function(t){return t=t.replace(/__wcf_preserve_character_1__/g,"”"),t=t.replace(/__wcf_preserve_character_2__/g,"“"),t=t.replace(/__wcf_preserve_character_3__/g,"‘"),t=t.replace(/__wcf_preserve_character_4__/g,"’")},i=this.clean.onPaste;this.clean.onPaste=function(n,o){return this.opts.replaceDivs=!0,n=t(n),n=i.call(this,n,o),this.opts.replaceDivs=!1,e(n)}.bind(this),this.clean.onPasteRemoveEmpty=function(t){return t.replace(/$/i,"")};var n=this.clean.removeSpaces;this.clean.removeSpaces=function(t){return t=t.replace(/\u200C/g,"__wcf_zwnj__"),t=t.replace(/\u200D/g,"__wcf_zwj__"),t=n.call(this,t),t=t.replace(/__wcf_zwnj__/g,"‌"),t.replace(/__wcf_zwj__/g,"‍")};var o=this.clean.onSet;this.clean.onSet=function(i){return i=t(i),i=o.call(this,i),e(i)}.bind(this)},code:function(){var t=this.code.startSync;this.code.startSync=function(){this.code.syncCode=void 0,t.call(this)}.bind(this);var e=this.code.textareaIndenting;this.code.textareaIndenting=function(t){return 9!==t.keyCode||t.ctrlKey?!0:e.call(this,t)}.bind(this);var i=this.code.showCode;this.code.showCode=function(){var t=null;this.$textarea.is(":visible")||(t=this.$textarea.parentsUntil(":visible").last(),t.show()),i.call(this),null!==t&&t.hide()}.bind(this)},dropdown:function(){this.dropdown.build=function(t,e,i){e.addClass("dropdownMenu"),$.each(i,function(t,i){if("dropdownDivider"==t)$('
  • "),o=$(''+i.title+"");o.on("click",$.proxy(function(e){e.preventDefault();var n="func",o=i.func;i.command?(n="command",o=i.command):i.dropdown&&(n="dropdown",o=i.dropdown),this.button.onClick(e,t,n,o),this.dropdown.hideAll()},this)),o.appendTo(n),n.appendTo(e)}}.bind(this))}.bind(this);var t=this.dropdown.show;this.dropdown.show=$.proxy(function(i,n){var o=this.button.get(n).data("dropdown");e(o),$.browser.iOS&&this.wutil.saveSelection(),t.call(this,i,n),o.off("mouseover mouseout")},this);var e=function(t){if(!t.hasClass("dropdownMenu")){t.addClass("dropdownMenu");for(var e=t.children("a").detach(),i=0;i").appendTo(t);n.append(e[i])}}}},image:function(){var t=this.image.setEditable;this.image.setEditable=function(e){e.hasClass("smiley")||t.call(this,e)}.bind(this);var e=this.image.loadEditableControls;this.image.loadEditableControls=function(t){var i=e.call(this,t);return t.hasClass("redactorDisableResize")&&i!==!1&&i.hide(),i}.bind(this),this.image.show=function(){this.modal.load("image",this.lang.get("image"),0);var t=this.modal.createActionButton(this.lang.get("insert"));t.click($.proxy(this.wbutton._insertImage,this)),this.selection.save(),this.modal.show()}.bind(this),this.image.showEdit=function(t){this.modal.load("imageEdit",this.lang.get("edit"),0),this.image.buttonSave=this.modal.createActionButton(this.lang.get("save")),this.image.buttonSave.click(function(){this.image.update(t)}.bind(this)),$("#redactor-image-link-source").val(t.attr("src")),$("#redactor-image-align").val(t.css("float")),this.modal.show()}.bind(this);var i=function(t){var e=t.parent();t=t.detach(),t.prependTo(e),this.caret.setAfter(t)}.bind(this);this.image.update=function(t){this.image.hideResize(),this.buffer.set(),t.attr("src",$("#redactor-image-link-source").val()),this.image.setFloating(t),i(t),this.modal.close(),this.observe.images()}.bind(this)},indent:function(){var t=this.indent.increase;this.indent.increase=function(){var e=this.selection.getBlock();e&&"LI"===e.tagName&&e.parentElement.firstChild!==e&&t.call(this)}.bind(this)},inline:function(){var t=(function(t,e){for(var i=t.parent();i[0]!==this.$editor[0]&&!(i.children(":not(.redactor-selection-marker)").length>1);){if("SPAN"===i[0].tagName&&i[0].style.getPropertyValue(e)){i.contents().unwrap();break}i=i.parent()}}.bind(this),this.inline.format);this.inline.format=function(e,i,n){$.browser.iOS&&this.wutil.restoreSelection(),t.call(this,e,i,n)}.bind(this);var e=this.inline.removeStyleRule;this.inline.removeStyleRule=function(t){$.browser.iOS&&this.wuil.restoreSelection(),e.call(this,t)}.bind(this)},insert:function(){var t=$.browser.webkit||document.documentElement.style.hasOwnProperty("WebkitAppearance")||window.hasOwnProperty("chrome"),e=function(t){var e=this.$editor.html();if(this.utils.isEmpty(e)){var i=!1;t.match(/^<(blockquote|div|p)/i)&&(this.$editor.empty(),i=!0),this.$editor.focus(),i||this.caret.setEnd(this.$editor.children("p:eq(0)"))}else if(document.activeElement!==this.$editor[0]&&this.wutil.restoreSelection(),t.match(/^<(blockquote|div|p)/i)&&getSelection().getRangeAt(0).collapsed){var n=getSelection().getRangeAt(0).startContainer;n.nodeType===Node.TEXT_NODE&&"​"===n.textContent&&this.caret.setEnd($(n.parentElement).html("
    "))}}.bind(this),i=function(){var t=!1;this.$editor.find("span").each(function(){var e=$(this);if("redactor"!==e.data("verified")){var i=$("helper").insertBefore(e);i.after(e.contents()),i.remove(),e.remove(),t=!0}}),t&&this.wutil.saveSelection()}.bind(this),n=this.insert.html;if(this.insert.html=function(o,a){e(o),n.call(this,o,a),this.wutil.saveSelection(),t&&setTimeout(function(){i()},10)}.bind(this),navigator.userAgent.match(/safari/i)){var o=this.insert.execHtml;this.insert.execHtml=function(t){try{o.call(this,t)}catch(t){console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: "+t.message)}}.bind(this)}},keydown:function(){this.keydown.enterWithinBlockquote=!1;var t=this.keydown.onTab;this.keydown.onTab=function(e,i){var n=this.selection.getBlock();return n&&"LI"===n.tagName?t.call(this,e,i):!0}.bind(this);var e=this.keydown.replaceDivToParagraph;this.keydown.replaceDivToParagraph=function(){this.keydown.enterWithinBlockquote?this.keydown.enterWithinBlockquote=!1:e.call(this)}.bind(this);var i=this.keydown.setupBuffer;this.keydown.setupBuffer=function(t,e){return!this.keydown.ctrl||89!==e||t.shiftKey||t.altKey||0===this.opts.rebuffer.length?void i.call(this,t,e):(t.preventDefault(),void this.buffer.redo())}.bind(this)},keyup:function(){var t=this.keyup.replaceToParagraph;this.keyup.replaceToParagraph=function(e){("DIV"!==this.keyup.current.tagName||"BLOCKQUOTE"!==this.keyup.current.parentElement.tagName)&&t.call(this,e)}.bind(this)},link:function(){var t=this.link.insert;this.link.insert=function(){t.call(this),this.selection.get();var e=this.selection.getCurrent();e.nodeType===Node.TEXT_NODE&&(e=e.parentElement),"A"===e.tagName&&this.caret.setAfter(e)}.bind(this)},modal:function(){this.modal.dialog=null;var t=this.modal.addTemplate;this.modal.addTemplate=function(e,i){"table"!==e&&t.call(this,e,i)}.bind(this),this.modal.build=function(){},this.modal.load=function(t,e,i){this.modal.templateName=t,this.modal.title=e,this.modal.dialog=$("
    ").hide().appendTo(document.body),this.modal.dialog.html(this.modal.getTemplate(this.modal.templateName)),this.$modalFooter=null}.bind(this),this.modal.show=function(){this.modal.dialog.wcfDialog({onClose:$.proxy(this.modal.close,this),title:this.modal.title}),this.modal.dialog.find("input:first").focus()}.bind(this);var e=this.modal.createButton;this.modal.createButton=function(t,i){return null===this.$modalFooter&&(this.$modalFooter=$('
    ').appendTo(this.modal.dialog),this.modal.dialog.addClass("dialogForm")),e.call(this,t,i)}.bind(this),this.modal.close=function(){if(null!==this.modal.dialog){try{this.modal.dialog.wcfDialog("close")}catch(t){}finally{if(this.modal.dialog){var t=this.modal.dialog.parents(".dialogContainer:eq(0)");t.length&&setTimeout(function(){t.remove()},500)}}this.modal.dialog=null}}.bind(this),this.modal.createCancelButton=function(){return $()},this.modal.createDeleteButton=function(){return $()}},observe:function(){var t=function(t,e,i,n,o,a){var s=this.$toolbar.find(i);if(t&&0!=t.closest(e,this.$editor[0]).length)s[n?"removeClass":"addClass"](o);else{if(a&&!this.opts.visual)return;s[n?"addClass":"removeClass"](o)}}.bind(this),e=this.observe.buttons;this.observe.buttons=function(i,n){e.call(this,i,n);var o=this.selection.getParent();o=o===!1?null:$(o),t(o,"ul, ol","a.re-indent, a.re-outdent",!0,"redactor-button-disabled"),t(o,"blockquote.quoteBox","a.re-__wcf_quote",!1,"redactor-button-disabled",!0),t(o,"sub","a.re-subscript",!1,"redactor-act"),t(o,"sup","a.re-superscript",!1,"redactor-act")}.bind(this);var i=this.observe.load;this.observe.load=function(){i.call(this),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","observe_load_"+this.$textarea.wcfIdentify())}.bind(this);var n=this.observe.showTooltip;this.observe.showTooltip=function(t){var e=$(t.target);e.hasClass("redactorQuoteEdit")||n.call(this,t)}.bind(this)},paste:function(){var t=this.paste.createPasteBox;this.paste.createPasteBox=function(){if($.browser.iOS){var e=0;if(window.getSelection().rangeCount){var i=window.getSelection().getRangeAt(0).endContainer;i.nodeType!==Node.ELEMENT_NODE&&(i=i.parentElement),i=$(i),e=$(i).offset().top}else e=$(window).scrollTop();this.$pasteBox=$("
    ").html("").attr("contenteditable","true").css({position:"fixed",top:e+"px",fontSize:"16px"}),this.$box.parent().append(this.$pasteBox),this.$pasteBox.focus()}else t.call(this)}.bind(this);var e=function(){var t=window.getSelection();if(t.rangeCount){var e=t.getRangeAt(0);if(e.collapsed){var i=e.startContainer;if(i.nodeType===Node.ELEMENT_NODE&&"DIV"===i.tagName){var n=i.parentNode;if(null!==n&&"BLOCKQUOTE"===n.tagName&&n.classList.contains("quoteBox")){var o=e.startContainer.childNodes[e.startContainer.childNodes.length-1],a=document.createRange();a.setStart(e.startContainer.childNodes[0],0),a.setEnd(o,o.length),a.collapse(!1),t.removeAllRanges(),t.addRange(a)}}}}},i=this.paste.insert;this.paste.insert=function(t){e(),i.call(this,t),setTimeout(function(){if(this.wutil.fixDOM(),$.browser.msie)getSelection().getRangeAt(0).collapse(!1);else if($.browser.mozilla){var t=getSelection().getRangeAt(0);t.startContainer===this.$editor[0]&&t.endContainer===this.$editor[0]&&this.wutil.selectionEndOfEditor()}this.wutil.saveSelection()}.bind(this),20)}.bind(this)},selection:function(){this.selection.implicitRange=null;var t=function(t,e){var i=e.nextSibling;null!==i&&i.nodeType===Node.TEXT_NODE&&0===i.length&&$(i).remove();var n=null;("selection-marker-1"===e.id&&!this.$editor.find("#selection-marker-2").length||"nodes-marker-1"===e.id&&!this.$editor.find("#nodes-marker-2").length)&&(n=e.previousSibling),$(e).remove(),null!==n?(this.selection.implicitRange=document.createRange(),this.selection.implicitRange.setStart(n,n.length),this.selection.implicitRange.setEnd(n,n.length)):this.selection.implicitRange=null}.bind(this);this.selection.removeMarkers=function(){this.$editor.find("span.redactor-selection-marker").each(t)}.bind(this),this.selection.removeNodesMarkers=function(){$(document).find("span.redactor-nodes-marker").each(t),this.$editor.find("span.redactor-nodes-marker").each(t)}.bind(this)},utils:function(){this.utils.removeEmpty=function(t,e){}},rebuildTemplates:function(){this.opts.modal.image='
    ",this.opts.modal.imageEdit=this.opts.modal.image,this.opts.modal.link='',this.opts.modal.quote='
    ';var t="";$.each(__REDACTOR_CODE_HIGHLIGHTERS,function(e,i){return"plain"===e?!0:void(t+='")}),this.opts.modal.code="
    "+WCF.Language.get("wcf.bbcode.code.settings")+'
    "+WCF.Language.get("wcf.bbcode.code.highlighter.description")+'
    '+WCF.Language.get("wcf.bbcode.code.lineNumber.description")+'
    '+WCF.Language.get("wcf.bbcode.code.filename.description")+"
    "+WCF.Language.get("wcf.bbcode.code")+'