From: Alexander Ebert Date: Sun, 1 May 2016 12:11:09 +0000 (+0200) Subject: Fixed message inline editing X-Git-Tag: 3.0.0_Beta_1~1783 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6cc04c587c3859a15bbddb9f25e170ad5d0ad6cf;p=GitHub%2FWoltLab%2FWCF.git Fixed message inline editing --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js index 21d6e8a03d..31c3cbdaa3 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js @@ -31,6 +31,11 @@ $.Redactor.prototype.WoltLabEvent = function() { return (data.cancel === false); }; + + // provide editor message on callback + EventHandler.add('com.woltlab.wcf.redactor2', 'getText_' + elementId, (function(data) { + data.message = this.code.get(); + }).bind(this)); }, register: function(callbackName, callback) { diff --git a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js index a738227dd0..3cce87563d 100644 --- a/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js +++ b/wcfsetup/install/files/js/WoltLab/WCF/Ui/Message/InlineEditor.js @@ -417,7 +417,8 @@ define( }; var id = this._getEditorId(); - EventHandler.fire('com.woltlab.wcf.redactor', 'getText_' + id, parameters.data); + + EventHandler.fire('com.woltlab.wcf.redactor2', 'getText_' + id, parameters.data); EventHandler.fire('com.woltlab.wcf.messageOptionsInline', 'submit_' + id, parameters); Ajax.api(this, {