From: Alexander Ebert Date: Wed, 8 Jun 2016 10:34:04 +0000 (+0200) Subject: Properly reset editor content on reset event X-Git-Tag: 3.0.0_Beta_1~1488 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e2a61ed59f9bbba4abd2268b023f98473284cb58;p=GitHub%2FWoltLab%2FWCF.git Properly reset editor content on reset event --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js index 31c3cbdaa3..9ef9749d24 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js @@ -36,6 +36,11 @@ $.Redactor.prototype.WoltLabEvent = function() { EventHandler.add('com.woltlab.wcf.redactor2', 'getText_' + elementId, (function(data) { data.message = this.code.get(); }).bind(this)); + + // clear editor content on reset + EventHandler.add('com.woltlab.wcf.redactor2', 'reset_' + elementId, (function() { + this.code.set(''); + }).bind(this)); }, register: function(callbackName, callback) {