Fix not saving addItemToToolbar recipe action for divider | (vertical separator) or wrapping - items to CKEditor 5

Created on 31 July 2024, 4 months ago
Updated 13 August 2024, 3 months ago

Problem/Motivation

Not able to add a divider or a wrapping in CKEditor 5
Using recipes

Steps to reproduce

Scenario: Add a divider to the Rich Editor with CKEditor 5

Given having a recipe named "add-divider-to-rich-editor"
And the recipe.yml file in it has

name: Add Divider to Rich Editor
description: 'A recipe to add a divider as (vertical separator) to the Rich Editor with CKEditor 5'
type: optional
config:
  actions:
    editor.editor.full_html:
      addItemToToolbar:
        item_name: '|'

When I run php core/scripts/drupal recipe /recipes/add-divider-to-rich-editor
Then I get the following out put

[notice] A backup checkpoint was not created because nothing has changed since the "Backup before the 'Add Divider to Rich Editor' recipe." checkpoint was created.
2/2 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“]
Applied Add Divider to Rich Editor recipe.

                                                                                                                        
 [OK] Add Divider to Rich Editor applied successfully

But the divider was not added to the full_html text format

Scenario: Add a Wrapping to the Rich Editor with CKEditor 5

Given having a recipe named "add-wrapping-to-rich-editor"
And the recipe.yml file in it has

name: Add Wrapping to Rich Editor
description: 'A recipe to add wrapping to the Rich Editor with CKEditor 5'
type: optional
config:
  actions:
    editor.editor.full_html:
      addItemToToolbar:
        item_name: '-'

When I run php core/scripts/drupal recipe /recipes/add-wrapping-to-rich-editor
Then I get the following out put

[notice] A backup checkpoint was not created because nothing has changed since the "Backup before the 'Add Divider to Rich Editor' recipe." checkpoint was created.
2/2 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“]
Applied Add Wrapping to Rich Editor recipe.

                                                                                                                        
 [OK] Add Wrapping to Rich Editor applied successfully                                                                  
                                                                                                                        

But the wrapping was not added to the full_html text format

Proposed resolution

  • Add save before return in the divider "|"
  • Add support for the wrapper "-" with save before the return

Remaining tasks

  • File an issue
  • MR(s) on each active branch
  • Test
  • Review

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
recipe systemΒ  β†’

Last updated about 17 hours ago

Created by

πŸ‡―πŸ‡΄Jordan Rajab Natshah Jordan

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024