From: Alexander Ebert Date: Tue, 16 Dec 2014 22:00:57 +0000 (+0100) Subject: Added [CTRL] + [Y] to redo (in addition to [CTRL] + [SHIFT] + [Z]) X-Git-Tag: 2.1.0_Beta_2~24 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d5b1132a2193ca1ca8d47c4ca861d06f1ba4f85;p=GitHub%2FWoltLab%2FWCF.git Added [CTRL] + [Y] to redo (in addition to [CTRL] + [SHIFT] + [Z]) --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js index 0fbea06d48..b3424b15bc 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js @@ -597,6 +597,19 @@ RedactorPlugins.wmonkeypatch = function() { $mpReplaceDivToParagraph.call(this); } }).bind(this); + + // keydown.setupBuffer + var $mpSetupBuffer = this.keydown.setupBuffer; + this.keydown.setupBuffer = (function(e, key) { + // undo + if (this.keydown.ctrl && key === 89 && !e.shiftKey && !e.altKey && this.opts.rebuffer.length !== 0) { + e.preventDefault(); + this.buffer.redo(); + return; + } + + $mpSetupBuffer.call(this, e, key); + }).bind(this); }, /**