- First commit to issue fork.
- Merge request !18Issue #3306246: Provide migration path for colorbutton configuration β (Open) created by yauheni
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
over 1 year ago 9:53am 29 December 2023 - π³π΄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 ) )
- First commit to issue fork.
- π¨π¦Canada danrod Ottawa
I refactored this a bit and I was able to migrate the font size and families, there's still some work to do with the colours, but I believe this can be merged to the 2.0.x branch for now. I'll deal with the colours later, screens below:
Screenshot of CKEditor 4:
Screenshot of CKEditor 5 after the migration:
- π¨π¦Canada danrod Ottawa
I'll move this to "Fixed" for now, if anyone is still having problems with migrating the fonts family and font sizes to CK5, please let me know and I'll re-open the task.
Thanks a lot to everyone involved.
Also please not that this module might be deprecated #3456411: Deprecate in favor of the CKEditor 5 Plugin Pack β
Automatically closed - issue fixed for 2 weeks with no activity.