From e2a61ed59f9bbba4abd2268b023f98473284cb58 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 8 Jun 2016 12:34:04 +0200 Subject: [PATCH] Properly reset editor content on reset event --- .../files/js/3rdParty/redactor2/plugins/WoltLabEvent.js | 5 +++++ 1 file changed, 5 insertions(+) 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) { -- 2.20.1