From 102748f2434cecb3542d0c91ca11b5c40f6237d8 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 5 Jan 2017 13:54:52 +0100 Subject: [PATCH] Fixed active states --- .../js/3rdParty/redactor2/plugins/WoltLabObserve.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js index 807758d505..7f2e86d5d0 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabObserve.js @@ -64,6 +64,17 @@ $.Redactor.prototype.WoltLabObserve = function() { this.button.enable('horizontalrule'); } + if (this.utils.isCurrentOrParent(['table', 'li'])) { + this.button.disable('code'); + this.button.disable('spoiler'); + this.button.disable('woltlabQuote'); + } + else { + this.button.enable('code'); + this.button.enable('spoiler'); + this.button.enable('woltlabQuote'); + } + // WoltLab modification: we know that there will be quite a few // active button states, so we'll simply check all ancestors one // by one instead of searching the DOM over and over again -- 2.20.1