Skip to content

Conversation

@k4lv15
Copy link
Contributor

@k4lv15 k4lv15 commented Dec 9, 2023

Motivation:

  • CKEditor5 has no global registry of editor instances and the current script used for setting WYSIWYG field's value no longer works if CKEditor5 is utilised. This leads to failing tests (i.e., when comparing the actual value with the expected one after filling out a WYSIWYG field)

Proposed change:

  • Enable filling CKEditor5 based fields while keeping backwards compatibility with CKEditor4 (and below) if needed.
  • The proposed solution checks if there is data-ckeditor5-id attribute present for the WYSIWYG field. If so, original script is overridden with CKEditor5 compatible version (see https://ckeditor.com/docs/ckeditor5/latest/examples/how-tos.html#how-to-get-the-editor-instance-object-from-the-dom-element). Therefore, we don't need any additional parameters of functions to handle CKEditor5 specifically as the existing one can decide itself which version of CKEditor is in use for the particular field and act accordingly.

@artursv
Copy link

artursv commented Feb 9, 2024

Tested this on my CKEditor5 implementation and it's working 👍

@guncha25 guncha25 changed the base branch from 9.x to 10.x March 8, 2024 07:04
@guncha25 guncha25 merged commit f8efb6f into guncha25:10.x Mar 8, 2024
@k4lv15 k4lv15 deleted the feature/support-ckeditor5-in-drupal-acceptance branch March 8, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants