From: Alexander Ebert Date: Mon, 2 Mar 2015 14:47:17 +0000 (+0100) Subject: Added undo/redo buttons X-Git-Tag: 2.1.1~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4e83160d1eb35b152022b98ee6128d471b2e6617;p=GitHub%2FWoltLab%2FWCF.git Added undo/redo buttons --- diff --git a/com.woltlab.wcf/templates/wysiwygToolbar.tpl b/com.woltlab.wcf/templates/wysiwygToolbar.tpl index 5e9de08d8d..6c2f63e178 100644 --- a/com.woltlab.wcf/templates/wysiwygToolbar.tpl +++ b/com.woltlab.wcf/templates/wysiwygToolbar.tpl @@ -1,4 +1,5 @@ $buttons.push('html'); + $buttons.push('separator'); {if $__wcf->getBBCodeHandler()->isAvailableBBCode('b')} diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js index d4be6fbb2b..a598ef99c1 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbutton.js @@ -87,6 +87,14 @@ RedactorPlugins.wbutton = function() { // handle image insert this.button.addCallback(this.button.get('image'), $.proxy(this.wbutton.insertImage, this)); + + // handle redo/undo buttons + var $undoButton = this.button.addAfter('html', 'undo', this.lang.get('undo')); + var $redoButton = this.button.addAfter('undo', 'redo', this.lang.get('redo')); + this.button.addCallback($undoButton, this.buffer.undo); + this.button.addCallback($redoButton, this.buffer.redo); + + $redoButton.parent().addClass('separator'); }, /**