Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Wed, 11 Oct 2017 09:35:19 +0000 (11:35 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Wed, 11 Oct 2017 09:35:19 +0000 (11:35 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/redactor.combined.min.js

index f0c18186043df5a02b4db8527b09ed4607e5cbfc..05edc9cd81f0cc1fd5c556bca220f6a308e9e966 100644 (file)
@@ -63,7 +63,7 @@ i.append(t(this).attr("name"),t(this).val())}),i},appendForms:function(e,i){if(!
 (function (window, undefined) { $.Redactor.prototype.WoltLabInsert=function(){"use strict";return{init:function(){var e=this.opts.woltlab.placeholderCallback,t=this.insert.html;this.insert.html=function(o,r){e&&(e=e());var n=window.getSelection();if(n.rangeCount&&"IMG"===n.anchorNode.nodeName&&this.caret.after(n.anchorNode),this.placeholder.hide(),this.core.editor().focus(),this.detect.isFirefox()){var i=n.anchorNode.nodeType===Node.TEXT_NODE?n.anchorNode.parentNode:n.anchorNode;null===i.closest(".redactor-layer")&&(this.selection.restore(),i=n.anchorNode.nodeType===Node.TEXT_NODE?n.anchorNode.parentNode:n.anchorNode,null===i.closest(".redactor-layer")&&(this.WoltLabCaret.endOfEditor(),this.selection.save()))}var a=this.selection.block(),l=""===this.$editor[0].innerHTML.replace(/<\/?p>/g,"").replace(/<br>/g,"").replace(/\u200B/g,"").trim();if(t.call(this,o,r),l&&(a=this.$editor[0].firstElementChild),a&&"P"===a.nodeName&&a.nextElementSibling){var c=!1;0===a.childElementCount&&""===a.textContent.replace(/\u200B/g,"").trim()?c=!0:1===a.childElementCount&&"<br>"===a.innerHTML&&(c=!0),c&&elRemove(a)}n.rangeCount&&"IMG"===n.anchorNode.nodeName&&this.caret.after(n.anchorNode)}.bind(this);var o=this.insert.text;this.insert.text=function(t){e&&(e=e()),o.call(this,t)}.bind(this)}}}; })(this);
 
 // plugins/WoltLabKeydown.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabKeydown=function(){"use strict";var e=[];return{init:function(){var e=window.getSelection(),t=this.keydown.init;this.keydown.init=function(i){var n;if(this.detect.isFirefox()&&e.isCollapsed&&i.which===this.keyCode.BACKSPACE&&(n=e.anchorNode,n.nodeType===Node.ELEMENT_NODE&&e.anchorOffset>0&&(n=n.childNodes[e.anchorOffset]),n.nodeType===Node.TEXT_NODE&&"​"===n.textContent)){for(var o=[],r=n;r=r.previousSibling;){if(r.nodeType===Node.ELEMENT_NODE){"IMG"!==r.nodeName&&(o=[]);break}if(r.nodeType===Node.TEXT_NODE){var s=r.textContent;if(""!==s&&"​"!==s){o=[];break}o.push(r)}}o.length&&o.forEach(elRemove)}if(!(!1===t.call(this,i)||i.originalEvent.defaultPrevented||(i=i.originalEvent,39!==i.which||i.ctrlKey||i.shiftKey||i.metaKey||i.altKey))){if(!e.isCollapsed)return;var l=e.anchorNode;if(l.nodeType!==Node.TEXT_NODE||e.getRangeAt(0).startOffset!==l.textContent.length)return;var a=l.parentNode;if("KBD"!==a.nodeName)return;var d=!0;for(n=a;n&&n!==this.core.editor()[0];){if(null!==n.nextSibling){for(;n.nextSibling&&n.nextSibling.nodeType===Node.TEXT_NODE&&0===n.nextSibling.textContent.length;)n.parentNode.removeChild(n.nextSibling);if(n.nextSibling&&"BR"!==n.nextSibling.nodeName||null!==n.nextSibling.nextSibling){d=!1;break}}n=n.parentNode}d&&a.parentNode.insertBefore(document.createTextNode("​"),a.nextSibling)}}.bind(this);var i=window.navigator.userAgent.toLowerCase();-1!==i.indexOf("linux")&&-1!==i.indexOf("android")&&-1!==i.indexOf("chrome")&&(this.keydown.checkEvents=function(){this.core.addEvent(!1)}.bind(this)),this.core.editor().off("keydown.redactor"),this.core.editor().on("keydown.redactor",this.keydown.init.bind(this)),this.keydown.onArrowDown=function(){for(var e=this.WoltLabKeydown._getBlocks(),t=0;t<e.length;t++)if(e[t])return this.keydown.insertAfterLastElement(e[t]),!1}.bind(this),this.keydown.onArrowUp=function(){for(var e=this.WoltLabKeydown._getBlocks(),t=0;t<e.length;t++)if(e[t])return this.keydown.insertBeforeFirstElement(e[t]),!1}.bind(this);var n=function(e){if(!1===this.core.callback("enter",e))return e.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(e))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(e);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(e);if(this.keydown.figure)setTimeout($.proxy(function(){this.keydown.replaceToParagraph("FIGURE")},this),1);else if(this.keydown.block){if(setTimeout($.proxy(function(){this.keydown.replaceToParagraph("DIV")},this),1),"LI"===this.keydown.block.tagName){var t=this.selection.current(),i=$(t).closest("li",this.$editor[0]),n=i.parentsUntil(this.$editor[0],"ul,ol").last();if(0!==i.length&&this.utils.isEmpty(i.html())&&0===n.next().length&&this.utils.isEmpty(n.find("li").last().html())){n.find("li").last().remove();var o=$(this.opts.emptyHtml);return n.after(o),this.caret.start(o),!1}}}else if(!this.keydown.block)return this.keydown.insertParagraph(e);return this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?(this.keydown.insertBreakLine(e),void setTimeout(function(){for(var e=this.selection.block(),t=this.selection.inline();t&&t!==e;){if("A"===t.nodeName){var i=!1;if(0===t.childNodes.length?i=!0:""===t.textContent.replace(/\u200B/g,"")&&(i=!0,elBySelAll("*",t,function(e){"SPAN"!==e.nodeName&&(i=!1)})),i){for(;t.childNodes.length;)t.parentNode.insertBefore(t.childNodes[0],t);elRemove(t);break}}t=t.parentNode}}.bind(this),1)):void 0}.bind(this);this.keydown.onEnter=function(e){var t=this.keydown.blockquote;t&&(this.keydown.blockquote=!1);var i=n.call(this,e);return t&&(this.keydown.blockquote=t),i}.bind(this),this.keydown.replaceToParagraph=function(e){var t=this.selection.block(),i=t.innerHTML.replace(/<br\s?\/?>/gi,"");if(t.tagName===e&&this.utils.isEmpty(i)&&!$(t).hasClass("redactor-in")){var n=document.createElement("p");$(t).replaceWith(n);var o=document.createRange();o.setStart(n,0);var r=document.createTextNode("​");o.insertNode(r),o.setStartAfter(r),o.collapse(!0);var s=window.getSelection();return s.removeAllRanges(),s.addRange(o),!1}"P"===t.tagName&&$(t).removeAttr("style")}.bind(this),this.keydown.onShiftEnter=function(e){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(e):this.insert.raw("<br>​")}.bind(this);var o=this.keydown.onTab;this.keydown.onTab=function(e,t){return!this.keydown.pre&&0===$(this.selection.current()).closest("ul, ol",this.core.editor()[0]).length||o.call(this,e,t)}.bind(this);var r=this.keydown.formatEmpty;this.keydown.formatEmpty=function(e){for(var t,i=this.$editor[0],n=0,o=i.childElementCount;n<o;n++)if(t=i.children[n],"P"!==t.nodeName&&this.utils.isBlockTag(t.nodeName))return;return r.call(this,e)}.bind(this),require(["Core","Environment"],function(e,t){if("desktop"===t.platform()){var i=this.$editor[0].closest("form, .message");if(null!==i){var n=elBySel(".formSubmit",i);if(null!==n){var o=elBySel('input[type="submit"], button[data-type="save"], button[accesskey="s"]',n);o&&(o.removeAttribute("accesskey"),this.WoltLabEvent.register("keydown",function(t){if(83===t.event.which){var i=!1;window.navigator.platform.match(/^Mac/)?t.event.ctrlKey&&t.event.altKey&&(i=!0):t.event.altKey&&!t.event.ctrlKey&&(i=!0),i&&(t.cancel=!0,"function"==typeof o.click?o.click():e.triggerEvent(o,WCF_CLICK_EVENT))}}.bind(this)))}}}}.bind(this)),this.WoltLabKeydown._handleBackspaceAndDelete()},register:function(t){-1===e.indexOf(t)&&e.push(t)},_getBlocks:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],i=0,n=e.length;i<n;i++)t.push(this.utils.isTag(this.keydown.current,e[i]));return t},_handleBackspaceAndDelete:function(){var e=function(e){return null===elBySel("img",e)&&""===e.textContent.replace(/\u200B/g,"").trim()},t=function(t){var i,n=this.selection.block();if(n)if("TD"===n.nodeName){var o=n.innerHTML;"​"===o?t.preventDefault():""===o&&(t.preventDefault(),n.innerHTML="​")}else if(-1!==n.nodeName.indexOf("-")&&e(n))i=n.parentNode,i.insertBefore(this.marker.get(),n.nextSibling),elRemove(n),this.selection.restore();else if((i=n&&"P"===n.nodeName?n.parentNode:null)&&-1!==i.nodeName.indexOf("-")){var r=window.getSelection().getRangeAt(0),s=document.createRange();s.setStartBefore(n),s.setEnd(r.startContainer,r.startOffset);var l=s.cloneContents(),a=elCreate("div");if(a.appendChild(l),e(a)){t.preventDefault();var d=n.previousElementSibling,h=null;if(d)h=e(d);else for(i=n;(i=i.parentNode)&&i!==this.$editor[0];)if(d=i.previousElementSibling){h=!1;break}if(h)elRemove(d);else if(null!==h){var c=n.parentNode;if("P"===d.nodeName){for(d.appendChild(this.marker.get());n.childNodes.length;)d.appendChild(n.childNodes[0]);elRemove(n),this.selection.restore()}else d.appendChild(n),n.insertBefore(this.marker.get(),n.firstChild),this.selection.restore();e(c)&&elRemove(c)}else null===h&&(i=n.parentNode,e(i)&&elRemove(i))}}}.bind(this),i=function(t){var i,n=this.selection.block();if(-1!==n.nodeName.indexOf("-")&&e(n))i=n.parentNode,i.insertBefore(this.marker.get(),n.nextSibling),elRemove(n),this.selection.restore();else if((i=n&&"P"===n.nodeName?n.parentNode:null)&&-1!==i.nodeName.indexOf("-")){var o=window.getSelection().getRangeAt(0),r=document.createRange();r.setStart(o.startContainer,o.startOffset),r.setEndAfter(n);var s=r.cloneContents(),l=elCreate("div");if(l.appendChild(s),e(l)){t.preventDefault();var a=n.nextElementSibling,d=null;if(a)d=e(a);else for(i=n;(i=i.parentNode)&&i!==this.$editor[0];)if(a=i.nextElementSibling){d=!1;break}if(d)elRemove(a);else if(null!==d){var h=a.parentNode;if("P"===a.nodeName){for(;a.childNodes.length;)n.appendChild(a.childNodes[0]);elRemove(a)}else{if(n.appendChild(this.marker.get()),i=n.parentNode,-1!==a.nodeName.indexOf("-")){var c=a.firstElementChild;if(c&&"P"===c.nodeName){for(;c.childNodes.length;)n.appendChild(c.childNodes[0]);a.removeChild(c),e(a)&&elRemove(a)}}else i.insertBefore(a,n.nextSibling);this.selection.restore()}e(h)&&elRemove(h)}else null===d&&(i=n.parentNode,e(i)&&elRemove(i))}}}.bind(this);this.keydown.onBackspaceAndDeleteAfter=function(e){this.detect.isFirefox()&&this.selection.isCollapsed()&&(e.which===this.keyCode.BACKSPACE?t(e):e.which===this.keyCode.DELETE&&i(e)),setTimeout($.proxy(function(){this.code.syncFire=!1,this.keydown.removeEmptyLists(),this.core.editor().find("*[style]").not("span, img, #redactor-image-box, #redactor-image-editter").removeAttr("style"),this.keydown.formatEmpty(e);var t=this.selection.current();"KBD"===t.nodeName&&0===t.innerHTML.length&&elRemove(t),this.code.syncFire=!0},this),1)}.bind(this)}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabKeydown=function(){"use strict";var e=[];return{init:function(){var e=window.getSelection(),t=this.keydown.init;this.keydown.init=function(n){var i;if(this.detect.isFirefox()&&e.isCollapsed&&n.which===this.keyCode.BACKSPACE&&(i=e.anchorNode,i.nodeType===Node.ELEMENT_NODE&&e.anchorOffset>0&&(i=i.childNodes[e.anchorOffset]),i.nodeType===Node.TEXT_NODE&&"​"===i.textContent)){for(var o=[],r=i;r=r.previousSibling;){if(r.nodeType===Node.ELEMENT_NODE){"IMG"!==r.nodeName&&(o=[]);break}if(r.nodeType===Node.TEXT_NODE){var s=r.textContent;if(""!==s&&"​"!==s){o=[];break}o.push(r)}}o.length&&o.forEach(elRemove)}if((n.which===this.keyCode.BACKSPACE||n.which===this.keyCode.DELETE)&&e.isCollapsed){var l=e.getRangeAt(0),a=l.startContainer;if(a.nodeType===Node.TEXT_NODE&&(a=a.parentNode),"P"===a.nodeName&&1===a.childNodes.length&&"​"===a.childNodes[0].textContent&&a.previousElementSibling!==a.nextElementSibling){var d=null,h=null;return n.which===this.keyCode.BACKSPACE?null===a.previousElementSibling?h=a.nextElementSibling:d=a.previousElementSibling:null===a.nextElementSibling?d=a.previousElementSibling:h=a.nextElementSibling,elRemove(a),null===h?this.caret.end(d):this.caret.start(h),void n.preventDefault()}}if(!(!1===t.call(this,n)||n.originalEvent.defaultPrevented||(n=n.originalEvent,39!==n.which||n.ctrlKey||n.shiftKey||n.metaKey||n.altKey))){if(!e.isCollapsed)return;var c=e.anchorNode;if(c.nodeType!==Node.TEXT_NODE||e.getRangeAt(0).startOffset!==c.textContent.length)return;var f=c.parentNode;if("KBD"!==f.nodeName)return;var u=!0;for(i=f;i&&i!==this.core.editor()[0];){if(null!==i.nextSibling){for(;i.nextSibling&&i.nextSibling.nodeType===Node.TEXT_NODE&&0===i.nextSibling.textContent.length;)i.parentNode.removeChild(i.nextSibling);if(i.nextSibling&&"BR"!==i.nextSibling.nodeName||null!==i.nextSibling.nextSibling){u=!1;break}}i=i.parentNode}u&&f.parentNode.insertBefore(document.createTextNode("​"),f.nextSibling)}}.bind(this);var n=window.navigator.userAgent.toLowerCase();-1!==n.indexOf("linux")&&-1!==n.indexOf("android")&&-1!==n.indexOf("chrome")&&(this.keydown.checkEvents=function(){this.core.addEvent(!1)}.bind(this)),this.core.editor().off("keydown.redactor"),this.core.editor().on("keydown.redactor",this.keydown.init.bind(this)),this.keydown.onArrowDown=function(){for(var e=this.WoltLabKeydown._getBlocks(),t=0;t<e.length;t++)if(e[t])return this.keydown.insertAfterLastElement(e[t]),!1}.bind(this),this.keydown.onArrowUp=function(){for(var e=this.WoltLabKeydown._getBlocks(),t=0;t<e.length;t++)if(e[t])return this.keydown.insertBeforeFirstElement(e[t]),!1}.bind(this);var i=function(e){if(!1===this.core.callback("enter",e))return e.preventDefault(),!1;if(this.keydown.blockquote&&!0===this.keydown.exitFromBlockquote(e))return!1;if(this.keydown.pre)return this.keydown.insertNewLine(e);if(this.keydown.blockquote||this.keydown.figcaption)return this.keydown.insertBreakLine(e);if(this.keydown.figure)setTimeout($.proxy(function(){this.keydown.replaceToParagraph("FIGURE")},this),1);else if(this.keydown.block){if(setTimeout($.proxy(function(){this.keydown.replaceToParagraph("DIV")},this),1),"LI"===this.keydown.block.tagName){var t=this.selection.current(),n=$(t).closest("li",this.$editor[0]),i=n.parentsUntil(this.$editor[0],"ul,ol").last();if(0!==n.length&&this.utils.isEmpty(n.html())&&0===i.next().length&&this.utils.isEmpty(i.find("li").last().html())){i.find("li").last().remove();var o=$(this.opts.emptyHtml);return i.after(o),this.caret.start(o),!1}}}else if(!this.keydown.block)return this.keydown.insertParagraph(e);return this.detect.isFirefox()&&this.utils.isInline(this.keydown.parent)?(this.keydown.insertBreakLine(e),void setTimeout(function(){for(var e=this.selection.block(),t=this.selection.inline();t&&t!==e;){if("A"===t.nodeName){var n=!1;if(0===t.childNodes.length?n=!0:""===t.textContent.replace(/\u200B/g,"")&&(n=!0,elBySelAll("*",t,function(e){"SPAN"!==e.nodeName&&(n=!1)})),n){for(;t.childNodes.length;)t.parentNode.insertBefore(t.childNodes[0],t);elRemove(t);break}}t=t.parentNode}}.bind(this),1)):void 0}.bind(this);this.keydown.onEnter=function(e){var t=this.keydown.blockquote;t&&(this.keydown.blockquote=!1);var n=i.call(this,e);return t&&(this.keydown.blockquote=t),n}.bind(this),this.keydown.replaceToParagraph=function(e){var t=this.selection.block(),n=t.innerHTML.replace(/<br\s?\/?>/gi,"");if(t.tagName===e&&this.utils.isEmpty(n)&&!$(t).hasClass("redactor-in")){var i=document.createElement("p");$(t).replaceWith(i);var o=document.createRange();o.setStart(i,0);var r=document.createTextNode("​");o.insertNode(r),o.setStartAfter(r),o.collapse(!0);var s=window.getSelection();return s.removeAllRanges(),s.addRange(o),!1}"P"===t.tagName&&$(t).removeAttr("style")}.bind(this),this.keydown.onShiftEnter=function(e){return this.buffer.set(),this.keydown.pre?this.keydown.insertNewLine(e):this.insert.raw("<br>​")}.bind(this);var o=this.keydown.onTab;this.keydown.onTab=function(e,t){return!this.keydown.pre&&0===$(this.selection.current()).closest("ul, ol",this.core.editor()[0]).length||o.call(this,e,t)}.bind(this);var r=this.keydown.formatEmpty;this.keydown.formatEmpty=function(e){for(var t,n=this.$editor[0],i=0,o=n.childElementCount;i<o;i++)if(t=n.children[i],"P"!==t.nodeName&&this.utils.isBlockTag(t.nodeName))return;return r.call(this,e)}.bind(this),require(["Core","Environment"],function(e,t){if("desktop"===t.platform()){var n=this.$editor[0].closest("form, .message");if(null!==n){var i=elBySel(".formSubmit",n);if(null!==i){var o=elBySel('input[type="submit"], button[data-type="save"], button[accesskey="s"]',i);o&&(o.removeAttribute("accesskey"),this.WoltLabEvent.register("keydown",function(t){if(83===t.event.which){var n=!1;window.navigator.platform.match(/^Mac/)?t.event.ctrlKey&&t.event.altKey&&(n=!0):t.event.altKey&&!t.event.ctrlKey&&(n=!0),n&&(t.cancel=!0,"function"==typeof o.click?o.click():e.triggerEvent(o,WCF_CLICK_EVENT))}}.bind(this)))}}}}.bind(this)),this.WoltLabKeydown._handleBackspaceAndDelete()},register:function(t){-1===e.indexOf(t)&&e.push(t)},_getBlocks:function(){for(var t=[this.keydown.blockquote,this.keydown.pre,this.keydown.figcaption],n=0,i=e.length;n<i;n++)t.push(this.utils.isTag(this.keydown.current,e[n]));return t},_handleBackspaceAndDelete:function(){var e=function(e){return null===elBySel("img",e)&&""===e.textContent.replace(/\u200B/g,"").trim()},t=function(t){var n,i=this.selection.block();if(i)if("TD"===i.nodeName){var o=i.innerHTML;"​"===o?t.preventDefault():""===o&&(t.preventDefault(),i.innerHTML="​")}else if(-1!==i.nodeName.indexOf("-")&&e(i))n=i.parentNode,n.insertBefore(this.marker.get(),i.nextSibling),elRemove(i),this.selection.restore();else if((n=i&&"P"===i.nodeName?i.parentNode:null)&&-1!==n.nodeName.indexOf("-")){var r=window.getSelection().getRangeAt(0),s=document.createRange();s.setStartBefore(i),s.setEnd(r.startContainer,r.startOffset);var l=s.cloneContents(),a=elCreate("div");if(a.appendChild(l),e(a)){t.preventDefault();var d=i.previousElementSibling,h=null;if(d)h=e(d);else for(n=i;(n=n.parentNode)&&n!==this.$editor[0];)if(d=n.previousElementSibling){h=!1;break}if(h)elRemove(d);else if(null!==h){var c=i.parentNode;if("P"===d.nodeName){for(d.appendChild(this.marker.get());i.childNodes.length;)d.appendChild(i.childNodes[0]);elRemove(i),this.selection.restore()}else d.appendChild(i),i.insertBefore(this.marker.get(),i.firstChild),this.selection.restore();e(c)&&elRemove(c)}else null===h&&(n=i.parentNode,e(n)&&elRemove(n))}}}.bind(this),n=function(t){var n,i=this.selection.block();if(-1!==i.nodeName.indexOf("-")&&e(i))n=i.parentNode,n.insertBefore(this.marker.get(),i.nextSibling),elRemove(i),this.selection.restore();else if((n=i&&"P"===i.nodeName?i.parentNode:null)&&-1!==n.nodeName.indexOf("-")){var o=window.getSelection().getRangeAt(0),r=document.createRange();r.setStart(o.startContainer,o.startOffset),r.setEndAfter(i);var s=r.cloneContents(),l=elCreate("div");if(l.appendChild(s),e(l)){t.preventDefault();var a=i.nextElementSibling,d=null;if(a)d=e(a);else for(n=i;(n=n.parentNode)&&n!==this.$editor[0];)if(a=n.nextElementSibling){d=!1;break}if(d)elRemove(a);else if(null!==d){var h=a.parentNode;if("P"===a.nodeName){for(;a.childNodes.length;)i.appendChild(a.childNodes[0]);elRemove(a)}else{if(i.appendChild(this.marker.get()),n=i.parentNode,-1!==a.nodeName.indexOf("-")){var c=a.firstElementChild;if(c&&"P"===c.nodeName){for(;c.childNodes.length;)i.appendChild(c.childNodes[0]);a.removeChild(c),e(a)&&elRemove(a)}}else n.insertBefore(a,i.nextSibling);this.selection.restore()}e(h)&&elRemove(h)}else null===d&&(n=i.parentNode,e(n)&&elRemove(n))}}}.bind(this);this.keydown.onBackspaceAndDeleteAfter=function(e){this.detect.isFirefox()&&this.selection.isCollapsed()&&(e.which===this.keyCode.BACKSPACE?t(e):e.which===this.keyCode.DELETE&&n(e)),setTimeout($.proxy(function(){this.code.syncFire=!1,this.keydown.removeEmptyLists(),this.core.editor().find("*[style]").not("span, img, #redactor-image-box, #redactor-image-editter").removeAttr("style"),this.keydown.formatEmpty(e);var t=this.selection.current();"KBD"===t.nodeName&&0===t.innerHTML.length&&elRemove(t),this.code.syncFire=!0},this),1)}.bind(this)}}}; })(this);
 
 // plugins/WoltLabLine.js
 (function (window, undefined) { $.Redactor.prototype.WoltLabLine=function(){"use strict";return{init:function(){this.line.removeOnBackspace=function(){if(this.utils.isCollapsed()){var t=$(this.selection.block());if(0!==t.length&&this.utils.isStartOfElement(t)){var i=t.prev();i.length&&"HR"===i[0].tagName&&(e.preventDefault(),i.remove())}}}.bind(this)}}}; })(this);
@@ -90,7 +90,7 @@ i.append(t(this).attr("name"),t(this).val())}),i},appendForms:function(e,i){if(!
 (function (window, undefined) { $.Redactor.prototype.WoltLabPage=function(){"use strict";return{init:function(){var t=this.button.add("woltlabPage","");require(["WoltLabSuite/Core/Ui/Redactor/Page"],function(e){new e(this,t[0])}.bind(this))}}}; })(this);
 
 // plugins/WoltLabPaste.js
-(function (window, undefined) { $.Redactor.prototype.WoltLabPaste=function(){"use strict";return{init:function(){var t=null,e=!1,i=document.documentMode&&"object"==typeof window.clipboardData,r=null,a=this.paste.init;this.paste.init=function(n){r=null;var s="pre"===this.opts.type||this.utils.isCurrentOrParent("pre");if(e=!s&&this.utils.isCurrentOrParent("kbd"),s||e){t=i?window.clipboardData.getData("Text"):n.originalEvent.clipboardData.getData("text/plain");var o=this.clean.encodeEntities;this.clean.encodeEntities=function(t){return this.clean.encodeEntities=o,WCF.String.escapeHTML(t)}.bind(this)}else if(this.detect.isFirefox()){var l=n.originalEvent.clipboardData.types;if(1===l.length&&"text/plain"===l[0]){var d=n.originalEvent.clipboardData.getData("text/plain");r="",d.split("\n").forEach(function(t){t=t.trim(),""===t&&(t="<br>"),r+="<p>"+t+"</p>"})}}a.call(this,n)}.bind(this);var n=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(a){var s=n.call(this,a);return e?t:!a||s&&!i?null!==r?r:s:t}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){t=t.originalEvent||t;var e;if(i){if(!window.clipboardData.files.length)return!1;e=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;var r=t.clipboardData,a=r.types;if(Array.isArray(a)&&-1!==a.indexOf("public.tiff"))return t.preventDefault(),!1;if(!r.items||!r.items.length)return;var n=!1;if(null===(e=r.items[0].getAsFile())&&(this.detect.isWebkit()&&r.items.length>1&&(e=r.items[1].getAsFile(),n=!0,null!==e&&t.preventDefault()),null===e))return!1}var s=new FileReader;return s.readAsDataURL(e),s.onload=this.paste.insertFromClipboard.bind(this),!1===n}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}),this.rtePaste=!1)}.bind(this);var s="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",o=this.paste.insert;this.paste.insert=function(t,r){if(e&&(r.pre=!0),this.utils.isCurrentOrParent("kbd")){o.call(this,t,r);var a=this.selection.current();a.nodeType===Node.TEXT_NODE&&(a=a.parentNode);for(var n=a.closest("kbd"),l=elByTag("p",n);l.length;)l[0].outerHTML=l[0].innerHTML;var d=n.innerHTML.split(/<br\s*\/?>/);if(d.length>1){for(var h=this.selection.block(),c=1,p=d.length;c<p;c++){var u=elCreate(h.nodeName);u.innerHTML="<kbd>"+d[c]+(c===p-1?this.marker.html():"")+"</kbd>",h.parentNode.insertBefore(u,h.nextSibling),h=u}n.innerHTML=d[0],this.selection.restore()}}else{if(r.pre)return o.call(this,t,r);var f=elCreate("div");f.innerHTML=t;var b=[];r.pre||r.text||elBySelAll("img",f,function(t){var e=t.src;if(0===e.indexOf("data:image")&&e!==s){t.src=s;var i=WCF.getUUID();elData(t,"uuid",i),b.push({src:e,uuid:i}),elHide(t)}}.bind(this)),o.call(this,f.innerHTML,r);var v=window.getSelection();v.rangeCount&&"A"===v.anchorNode.nodeName&&v.anchorOffset===v.anchorNode.childNodes.length&&this.caret.after(v.anchorNode),b.length&&window.setTimeout(function(){for(var t,e,r=0,a=b.length;r<a;r++)t=b[r],(e=elBySel('img[data-uuid="'+t.uuid+'"]',this.$editor[0]))&&(i?e.parentNode.removeChild(e):WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.src),replace:e}))}.bind(this),50);var A,g=[],m=this.core.editor()[0];for(c=0,p=m.childNodes.length;c<p;c++)A=m.childNodes[c],A.nodeType===Node.TEXT_NODE&&"​"===A.textContent&&g.push(A);g.forEach(elRemove),this.rtePaste=!1}}.bind(this),this.paste.clipboardUpload=function(){}}}}; })(this);
+(function (window, undefined) { $.Redactor.prototype.WoltLabPaste=function(){"use strict";return{init:function(){var t=null,e=!1,i=document.documentMode&&"object"==typeof window.clipboardData,r=null,a=this.paste.init;this.paste.init=function(n){r=null;var s="pre"===this.opts.type||this.utils.isCurrentOrParent("pre");if(e=!s&&this.utils.isCurrentOrParent("kbd"),s||e){t=i?window.clipboardData.getData("Text"):n.originalEvent.clipboardData.getData("text/plain");var o=this.clean.encodeEntities;this.clean.encodeEntities=function(t){return this.clean.encodeEntities=o,WCF.String.escapeHTML(t)}.bind(this)}else if(this.detect.isFirefox()){var l=n.originalEvent.clipboardData.types;if(1===l.length&&"text/plain"===l[0]){var d=WCF.String.escapeHTML(n.originalEvent.clipboardData.getData("text/plain"));r="";var h=d.split("\n");1===h.length?r=d:h.forEach(function(t){t=t.trim(),""===t&&(t="<br>"),r+="<p>"+t+"</p>"})}}a.call(this,n)}.bind(this);var n=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(a){var s=n.call(this,a);return e?t:!a||s&&!i?null!==r?r:s:t}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){t=t.originalEvent||t;var e;if(i){if(!window.clipboardData.files.length)return!1;e=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;var r=t.clipboardData,a=r.types;if(Array.isArray(a)&&-1!==a.indexOf("public.tiff"))return t.preventDefault(),!1;if(!r.items||!r.items.length)return;var n=!1;if(null===(e=r.items[0].getAsFile())&&(this.detect.isWebkit()&&r.items.length>1&&(e=r.items[1].getAsFile(),n=!0,null!==e&&t.preventDefault()),null===e))return!1}var s=new FileReader;return s.readAsDataURL(e),s.onload=this.paste.insertFromClipboard.bind(this),!1===n}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}),this.rtePaste=!1)}.bind(this);var s="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",o=this.paste.insert;this.paste.insert=function(t,r){if(e&&(r.pre=!0),this.utils.isCurrentOrParent("kbd")){o.call(this,t,r);var a=this.selection.current();a.nodeType===Node.TEXT_NODE&&(a=a.parentNode);for(var n=a.closest("kbd"),l=elByTag("p",n);l.length;)l[0].outerHTML=l[0].innerHTML;var d=n.innerHTML.split(/<br\s*\/?>/);if(d.length>1){for(var h=this.selection.block(),c=1,p=d.length;c<p;c++){var u=elCreate(h.nodeName);u.innerHTML="<kbd>"+d[c]+(c===p-1?this.marker.html():"")+"</kbd>",h.parentNode.insertBefore(u,h.nextSibling),h=u}n.innerHTML=d[0],this.selection.restore()}}else{if(r.pre)return o.call(this,t,r);var f=elCreate("div");f.innerHTML=t;var b=[];r.pre||r.text||elBySelAll("img",f,function(t){var e=t.src;if(0===e.indexOf("data:image")&&e!==s){t.src=s;var i=WCF.getUUID();elData(t,"uuid",i),b.push({src:e,uuid:i}),elHide(t)}}.bind(this)),o.call(this,f.innerHTML,r);var v=window.getSelection();v.rangeCount&&"A"===v.anchorNode.nodeName&&v.anchorOffset===v.anchorNode.childNodes.length&&this.caret.after(v.anchorNode),b.length&&window.setTimeout(function(){for(var t,e,r=0,a=b.length;r<a;r++)t=b[r],(e=elBySel('img[data-uuid="'+t.uuid+'"]',this.$editor[0]))&&(i?e.parentNode.removeChild(e):WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.src),replace:e}))}.bind(this),50);var g,A=[],m=this.core.editor()[0];for(c=0,p=m.childNodes.length;c<p;c++)g=m.childNodes[c],g.nodeType===Node.TEXT_NODE&&"​"===g.textContent&&A.push(g);A.forEach(elRemove),this.rtePaste=!1}}.bind(this),this.paste.clipboardUpload=function(){}}}}; })(this);
 
 // plugins/WoltLabQuote.js
 (function (window, undefined) { $.Redactor.prototype.WoltLabQuote=function(){"use strict";return{init:function(){var t=this.button.add("woltlabQuote","");this.WoltLabBlock.register("woltlab-quote",!0),this.opts.replaceTags.blockquote="woltlab-quote",this.opts.activeButtonsStates["woltlab-quote"]="woltlabQuote",require(["WoltLabSuite/Core/Ui/Redactor/Quote"],function(o){new o(this,t)}.bind(this))}}}; })(this);