From: Alexander Ebert Date: Fri, 20 Jan 2017 10:08:55 +0000 (+0100) Subject: Fixed paste handling X-Git-Tag: 3.0.1~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f3581e974fb6adf02abe4fdd1480e57d13271338;p=GitHub%2FWoltLab%2FWCF.git Fixed paste handling --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js index 3117a675c1..2038df8e0b 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabPaste.js @@ -125,10 +125,7 @@ $.Redactor.prototype.WoltLabPaste = function() { this.paste.insert = (function(html, data) { if (isKbd) data.pre = true; - if (data.pre) { - return mpInsert.call(this, html, data); - } - else if (this.utils.isCurrentOrParent('kbd')) { + if (this.utils.isCurrentOrParent('kbd')) { mpInsert.call(this, html, data); var current = this.selection.current(); @@ -159,6 +156,9 @@ $.Redactor.prototype.WoltLabPaste = function() { return; } + else if (data.pre) { + return mpInsert.call(this, html, data); + } var div = elCreate('div'); div.innerHTML = html;