Strip the menu group for blocks
authorAlexander Ebert <ebert@woltlab.com>
Fri, 11 Aug 2023 09:43:09 +0000 (11:43 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 11 Aug 2023 09:43:09 +0000 (11:43 +0200)
com.woltlab.wcf/templates/wysiwyg.tpl
ts/WoltLabSuite/Core/Component/Ckeditor/Configuration.ts
wcfsetup/install/files/acp/templates/wysiwyg.tpl
wcfsetup/install/files/js/WoltLabSuite/Core/Component/Ckeditor/Configuration.js
wcfsetup/install/files/style/ui/ckeditor.scss
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index e33b9e36e45b5e232cc81ae94445ff16d61cf902..225e1c0b2b34dee39a1e8310e92ef2e4aa55b044 100644 (file)
@@ -34,7 +34,6 @@
                {jsphrase name='wcf.ckeditor.quote'}
                {jsphrase name='wcf.ckeditor.quote.author'}
                {jsphrase name='wcf.ckeditor.quoteFrom'}
-               {jsphrase name='wcf.editor.button.group.block'}
                {jsphrase name='wcf.editor.button.group.format'}
                {jsphrase name='wcf.editor.button.group.list'}
                {jsphrase name='wcf.editor.button.spoiler'}
index 168152ac7a907d0afca8a90132fb55fb8e8a5bdb..ddd54e4c946a50ddf54bb95ac68fae4b029f615e 100644 (file)
@@ -180,41 +180,29 @@ class ConfigurationBuilder {
   }
 
   #setupBlocks(): void {
-    const items: string[] = [];
-
     if (this.#features.table) {
-      items.push("insertTable");
+      this.#toolbar.push("insertTable");
     } else {
       this.#removePlugins.push("Table", "TableToolbar");
     }
 
-    items.push(this.#divider);
-
     if (this.#features.quoteBlock) {
-      items.push("blockQuote");
+      this.#toolbar.push("blockQuote");
     } else {
       this.#removePlugins.push("BlockQuote", "WoltlabBlockQuote");
     }
 
     if (this.#features.spoiler) {
-      items.push("spoiler");
+      this.#toolbar.push("spoiler");
     } else {
       this.#removePlugins.push("WoltlabSpoiler");
     }
 
     if (this.#features.html) {
-      items.push("htmlEmbed");
+      this.#toolbar.push("htmlEmbed");
     } else {
       this.#removePlugins.push("HtmlEmbed");
     }
-
-    if (items.length > 0) {
-      this.#toolbar.push({
-        label: getPhrase("wcf.editor.button.group.block"),
-        icon: "plus",
-        items,
-      });
-    }
   }
 
   #insertDivider(): void {
index e33b9e36e45b5e232cc81ae94445ff16d61cf902..225e1c0b2b34dee39a1e8310e92ef2e4aa55b044 100644 (file)
@@ -34,7 +34,6 @@
                {jsphrase name='wcf.ckeditor.quote'}
                {jsphrase name='wcf.ckeditor.quote.author'}
                {jsphrase name='wcf.ckeditor.quoteFrom'}
-               {jsphrase name='wcf.editor.button.group.block'}
                {jsphrase name='wcf.editor.button.group.format'}
                {jsphrase name='wcf.editor.button.group.list'}
                {jsphrase name='wcf.editor.button.spoiler'}
index c6dfc3c851229c3e7a1e7567841a2870af3ce596..7f8f477acfa4e1681ab1515483a1fd42a8b1a3de 100644 (file)
@@ -163,39 +163,30 @@ define(["require", "exports", "../../Language"], function (require, exports, Lan
             }
         }
         #setupBlocks() {
-            const items = [];
             if (this.#features.table) {
-                items.push("insertTable");
+                this.#toolbar.push("insertTable");
             }
             else {
                 this.#removePlugins.push("Table", "TableToolbar");
             }
-            items.push(this.#divider);
             if (this.#features.quoteBlock) {
-                items.push("blockQuote");
+                this.#toolbar.push("blockQuote");
             }
             else {
                 this.#removePlugins.push("BlockQuote", "WoltlabBlockQuote");
             }
             if (this.#features.spoiler) {
-                items.push("spoiler");
+                this.#toolbar.push("spoiler");
             }
             else {
                 this.#removePlugins.push("WoltlabSpoiler");
             }
             if (this.#features.html) {
-                items.push("htmlEmbed");
+                this.#toolbar.push("htmlEmbed");
             }
             else {
                 this.#removePlugins.push("HtmlEmbed");
             }
-            if (items.length > 0) {
-                this.#toolbar.push({
-                    label: (0, Language_1.getPhrase)("wcf.editor.button.group.block"),
-                    icon: "plus",
-                    items,
-                });
-            }
         }
         #insertDivider() {
             this.#toolbar.push(this.#divider);
index 17cc7cdcba33347ba854b141c14cf2624412b22c..ef4dff2d3577cbbd148555260e2ad23c497b16cb 100644 (file)
                        background-color: var(--wcfButtonPrimaryBackgroundActive);
                }
        }
-
-       .ck.ck-toolbar__items .ck.ck-button:not(.ck-disabled, .ck-on):hover {
-               background: var(--ck-color-button-default-background);
-               color: var(--ck-color-text);
-       }
 }
 
 .ck-body-wrapper {
index 65cd124f961520628572be5ee04dec9bcca735a1..8a17db70b04a57feb82c26cdd20995e4bae59e2a 100644 (file)
@@ -3907,7 +3907,6 @@ Dateianhänge:
                <item name="wcf.editor.table.rows"><![CDATA[Zeilen]]></item>
 
                <item name="wcf.editor.button.article"><![CDATA[CMS-Artikel]]></item>
-               <item name="wcf.editor.button.group.block"><![CDATA[Block einfügen]]></item>
                <item name="wcf.editor.button.group.format"><![CDATA[Text formatieren]]></item>
                <item name="wcf.editor.button.group.list"><![CDATA[Listen]]></item>
                <item name="wcf.editor.button.media"><![CDATA[Media]]></item>
@@ -7564,5 +7563,6 @@ Benachrichtigungen auf <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phra
        <item name="wcf.user.objectWatch.subscribe.com.woltlab.wcf.article.category"/>
        <item name="wcf.user.objectWatch.enableNotification.com.woltlab.wcf.article.category"/>
        <item name="wcf.user.objectWatch.unsubscribe.com.woltlab.wcf.article.category"/>
+       <item name="wcf.editor.button.group.block"/>
 </delete>
 </language>
index 9ac15eb8990d4ffb20813c1682823209eea5caf2..84cf1677ca89f43304c9d90c9e8dcdd2ddb60d64 100644 (file)
@@ -3853,7 +3853,6 @@ Attachments:
                <item name="wcf.editor.table.rows"><![CDATA[Rows]]></item>
 
                <item name="wcf.editor.button.article"><![CDATA[CMS Article]]></item>
-               <item name="wcf.editor.button.group.block"><![CDATA[Insert Block]]></item>
                <item name="wcf.editor.button.group.format"><![CDATA[Format Text]]></item>
                <item name="wcf.editor.button.group.list"><![CDATA[Lists]]></item>
                <item name="wcf.editor.button.media"><![CDATA[Media]]></item>
@@ -7458,5 +7457,6 @@ your notifications on <a href="{link isHtmlEmail=true}{/link}">{PAGE_TITLE|phras
        <item name="wcf.user.objectWatch.subscribe.com.woltlab.wcf.article.category"/>
        <item name="wcf.user.objectWatch.enableNotification.com.woltlab.wcf.article.category"/>
        <item name="wcf.user.objectWatch.unsubscribe.com.woltlab.wcf.article.category"/>
+       <item name="wcf.editor.button.group.block"/>
 </delete>
 </language>