Provide migration path for colorbutton configuration

Created on 26 August 2022, about 2 years ago
Updated 16 January 2024, 10 months ago

Problem/Motivation

As of right now, there exists no configuration migration for colorbutton configurations over to ckeditor_font. Let's make that happen so the migration process to CKE5 is as smooth as possible.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Webbeh Georgia, USA

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • I have prepared a PR with the following changes
    - FontSizeAndFamily plugin update for "colorbutton" migration
    - updating FontBackgroundColor and FontColor plugins so that default colors are used when empty settings (behavior from "colorbutton")

    Here is the patch with these changes

  • Status changed to Needs review 11 months ago
  • πŸ‡³πŸ‡΄Norway magnarmartinsen

    Hi. I tried the upgrade from CkEditor4 to CkEdtior 5, with colorbutton and preconfigured colors.
    The site is running Drupal 10.2.1. During the upgrade from CkEditor4 to CkEditor 5 using ckeditor_font:2.0.x-dev with the 3306246-4.patch.

    However I get an error and the upgrade fails with message:
    "

    Error message
    Oops, something went wrong. Check your browser's developer console for more details.

    "

    In the logs i find the following error:
    AssertionError: assert(count($cke5_plugin_settings) === 1) in assert() (line 484 of /var/www/html/web/core/modules/ckeditor5/src/SmartDefaultSettings.php).

    Adding some debug before the assertion test before line 484 in web/core/modules/ckeditor5/src/SmartDefaultSettings.php, gives me:

    $cke4_plugin_id="colorbutton"
    and

    $cke5_plugin_settings=Array
    (
        [ckeditor_font_font_color] => Array
            (
                [font_colors] => #474994
    #E7B059
    #E8BBBA
    #A0CCCB
    #ff0000
            )
    
        [ckeditor_font_font_background_color] => Array
            (
                [font_backgroundcolors] => #474994
    #E7B059
    #E8BBBA
    #A0CCCB
    #ff0000
            )
    
    )
Production build 0.71.5 2024