From 2ebbd63872b5e6b9a27bc1552a8c3a6a905cde59 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 21 Nov 2023 13:40:15 +0100 Subject: [PATCH] Swap the inline code and code editor buttons The code block is more likely to be used and the inline code being the first one makes it easy to misuse it for larger blocks. --- .../Core/Component/Ckeditor/Configuration.ts | 12 ++++++------ .../Core/Component/Ckeditor/Configuration.js | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ts/WoltLabSuite/Core/Component/Ckeditor/Configuration.ts b/ts/WoltLabSuite/Core/Component/Ckeditor/Configuration.ts index 98e816c71c..f3ac00b3f3 100644 --- a/ts/WoltLabSuite/Core/Component/Ckeditor/Configuration.ts +++ b/ts/WoltLabSuite/Core/Component/Ckeditor/Configuration.ts @@ -165,17 +165,17 @@ class ConfigurationBuilder { } #setupCodeFormat(): void { - if (this.#features.code) { - this.#toolbar.push("code"); - } else { - this.#removePlugins.push("Code", "WoltlabCode"); - } - if (this.#features.codeBlock) { this.#toolbar.push("codeBlock"); } else { this.#removePlugins.push("CodeBlock", "WoltlabCodeBlock"); } + + if (this.#features.code) { + this.#toolbar.push("code"); + } else { + this.#removePlugins.push("Code", "WoltlabCode"); + } } #setupBlocks(): void { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor/Configuration.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor/Configuration.js index 3def508824..687404b063 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor/Configuration.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor/Configuration.js @@ -149,18 +149,18 @@ define(["require", "exports", "../../Language"], function (require, exports, Lan } } #setupCodeFormat() { - if (this.#features.code) { - this.#toolbar.push("code"); - } - else { - this.#removePlugins.push("Code", "WoltlabCode"); - } if (this.#features.codeBlock) { this.#toolbar.push("codeBlock"); } else { this.#removePlugins.push("CodeBlock", "WoltlabCodeBlock"); } + if (this.#features.code) { + this.#toolbar.push("code"); + } + else { + this.#removePlugins.push("Code", "WoltlabCode"); + } } #setupBlocks() { if (this.#features.table) { -- 2.20.1