From: Alexander Ebert Date: Fri, 19 Aug 2016 14:29:13 +0000 (+0200) Subject: Fixed direct quote insert X-Git-Tag: 3.0.0_Beta_1~661 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de6aaaaff76315fa803cf17a79899e01ce4f0d04;p=GitHub%2FWoltLab%2FWCF.git Fixed direct quote insert --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index ea4ddc05b7..43152409af 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -1604,6 +1604,16 @@ WCF.Message.Quote.Manager = Class.extend({ this._toggleShowQuotes(); WCF.System.Event.addListener('com.woltlab.wcf.quote', 'reload', this.countQuotes.bind(this)); + + // event forwarding + WCF.System.Event.addListener('com.woltlab.wcf.message.quote', 'insert', (function(data) { + WCF.System.Event.fireEvent('com.woltlab.wcf.redactor2', 'insertQuote_' + (this._editorIdAlternative ? this._editorIdAlternative : this._editorId), { + author: data.quote.username, + content: data.quote.text, + isText: true, + link: data.quote.link + }); + }).bind(this)); }, /** diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js index e89bf943c5..44409166e9 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Quote.js @@ -96,7 +96,7 @@ define(['Core', 'EventHandler', 'EventKey', 'Language', 'StringUtil', 'Dom/Util' elData(quote, 'link', data.link); if (data.isText) { - this.insert.text(data.content); + this._editor.insert.text(data.content); } quote.removeAttribute('id');