Added [CTRL] + [Y] to redo (in addition to [CTRL] + [SHIFT] + [Z])
authorAlexander Ebert <ebert@woltlab.com>
Tue, 16 Dec 2014 22:00:57 +0000 (23:00 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 16 Dec 2014 22:00:57 +0000 (23:00 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index 0fbea06d487f71248504f7c3d0e011c6e690d3ad..b3424b15bc291ff56b51c171f951a6b8be3862e7 100644 (file)
@@ -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);
                },
                
                /**