FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add support for CKEditor5 in DrupalAcceptance->fillWysiwygEditor by k4lv15 · Pull Request #27 · guncha25/drupal-codeception · GitHub

Add support for CKEditor5 in DrupalAcceptance->fillWysiwygEditor - #27

Merged
guncha25 merged 1 commit into
guncha25:10.xfrom
k4lv15:feature/support-ckeditor5-in-drupal-acceptance
Mar 8, 2024
Merged

Add support for CKEditor5 in DrupalAcceptance->fillWysiwygEditor#27
guncha25 merged 1 commit into
guncha25:10.xfrom
k4lv15:feature/support-ckeditor5-in-drupal-acceptance

Conversation

k4lv15 commented Dec 9, 2023

Copy link
Copy Markdown

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 commented Feb 9, 2024

Copy link
Copy Markdown

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

guncha25 changed the base branch from 9.x to 10.x March 8, 2024 07:04
guncha25 merged commit f8efb6f into guncha25:10.x Mar 8, 2024
k4lv15 deleted the feature/support-ckeditor5-in-drupal-acceptance branch March 8, 2024 11:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL