From 5d5b1132a2193ca1ca8d47c4ca861d06f1ba4f85 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 16 Dec 2014 23:00:57 +0100 Subject: [PATCH] Added [CTRL] + [Y] to redo (in addition to [CTRL] + [SHIFT] + [Z]) --- .../js/3rdParty/redactor/plugins/wmonkeypatch.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); }, /** -- 2.20.1