Allow recipe to add multiple buttons to CKEditor toolbar

Created on 18 February 2025, 4 months ago

When using `addItemToToolbar` currently you can only add a single toolbar item to CKEditor within one recipe. We need something like `addItemsToToolbar` that would accept an array of items.

✨ Feature request
Status

Active

Version

11.1 πŸ”₯

Component

recipe system

Created by

πŸ‡ΊπŸ‡ΈUnited States mpotter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @mpotter
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Fully agreed that we need this. I can get this written pretty fast.

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • Merge request !11241Add multiple variant β†’ (Open) created by phenaproxima
  • Pipeline finished with Failed
    4 months ago
    Total: 113s
    #428017
  • πŸ‡ΊπŸ‡ΈUnited States mpotter

    Using this:

        editor.editor.content_format:
          addItemsToToolbar:
            -
              item_name: aickeditor
            -
              item_name: aiAgentButton
    

    I get the error:

    PHP Fatal error:  Cannot declare class Drupal\ckeditor5\Plugin\ConfigAction\AddItemToToolbar, because the name is already in use in /var/www/docroot/core/modules/ckeditor5/src/Plugin/ConfigAction/AddItemsToToolbar.php on line 16
    
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • Pipeline finished with Failed
    4 months ago
    Total: 361s
    #428033
  • Pipeline finished with Canceled
    4 months ago
    Total: 101s
    #428038
  • Pipeline finished with Success
    4 months ago
    Total: 302s
    #428041
  • πŸ‡ΊπŸ‡ΈUnited States mpotter

    Tested the patch manually and it worked for my site.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Please keep the standard issue summary second, it makes it easier to review as the issue progresses.

    I think this will be a great addition!

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts
  • Pipeline finished with Canceled
    4 months ago
    #429391
  • Pipeline finished with Failed
    4 months ago
    Total: 96s
    #429392
  • Pipeline finished with Failed
    4 months ago
    Total: 105s
    #429395
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Php Stan is failing for covers and one question in the MR.

  • Status changed to Needs work 25 days ago
  • First commit to issue fork.
  • πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

    Rebased the MR on current 11.x to resolve merge conflict.

  • Pipeline finished with Failed
    25 days ago
    Total: 145s
    #512208
  • Pipeline finished with Failed
    25 days ago
    Total: 202s
    #512214
  • Pipeline finished with Success
    25 days ago
    Total: 482s
    #512263
  • πŸ‡§πŸ‡ͺBelgium svendecabooter Gent

    All code review issues have been fixed, and extra explanation has been provided.
    Setting this to Needs Review.

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    Added Needs change record tag.

  • πŸ‡ΊπŸ‡ΈUnited States mpotter

    Is anyone able to post a `.patch` file from before the rebase to the current 11.x-dev that still applies to the 11.1.7 release version? I was referencing this MR and didn't download the diff locally, so now my build is broken because this latest patch no longer applies. The rebase is going to make recreating the patch for 11.1.7 a lot of work.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    I think there is a tag when there is a force push.

    You can also go to the changes team and select an older version.

    This highlights why a diff should never be directly referenced.

  • πŸ‡ΊπŸ‡ΈUnited States mpotter

    I do not see any tags in this MR. I also don't see how to select an older version in the changes "tab". I think the rebase modified the commit history or something.

    In any case, I spend the last hour manually getting a patch that applies to 11.1.7 and am uploading it for myself and others to use.

  • πŸ‡ΊπŸ‡ΈUnited States mpotter

    except that still doesn't seem to apply to my project. Let me check if I've got another patch interfering with this.

  • πŸ‡ΊπŸ‡ΈUnited States mpotter

    ok, it was a problem with my local file paths. This patch should work with 11.1.7 now

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    I've attached a screenshot of what I meant.

    This is getting a bit off topic, so feel free to move comments to the issue about static patches, or ping me in slack.

    Also yes, rebasing by definition changes history, it rolls back the changes you've made on the current branch, applies the changes on the branch you're rebasing onto then tries to re-apply the changes you've made.

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Also agree with the comment in the MR could that be cleaned up some?

Production build 0.71.5 2024