jtwalters β made their first commit to this issueβs fork.
Re-rolled for Drupal 10.2.3 with Promise.resolve()
change per #22
The current patch direction does not account for editors that do not return a Promise. This results in a JS error, like that below:
Uncaught TypeError: Drupal.editors[format.editor].attach(...).then is not a function
Example: Try creating an Ace Editor text format and then switching to it, and then try switching back to a CKEditor 5 type format.
Tested the latest patch manually and it works for us. Our team has a custom automated test that depends on the source entity being correct, and this checks out there as well. Would be nice to see if anyone else has a use case for this and can confirm it works for them.
Here's a patch tested on 6.2.0-beta5.
jtwalters β created an issue.