Problem/Motivation
The ck5 upgrade included in Drupal 11.2.10/ 11.3.2 and Drupal 10.6.2 breaks codemirror 5.6.20 and lower.
Upgrade is needed
Made a pull request upstream with the fix:
https://github.com/codemirror/codemirror5/pull/7154
History explained here:
#3531472: Drupal 10.5 / 11.2 incompatibility
Steps to reproduce
Install wxt 5.6.x , wxt 6.2.x
add content
view source mode, notice codemirror exception in javascript console and missing codemirror enhancements/functionality.
Proposed resolution
composer require codemirror/codemirror:'^5.65.21'
Remaining tasks
Update wxt composer.json accordingly
User interface changes
Restore codemirror functionality, resolve ck5+codemirror regression.
API changes
See proposed resolution.
Data model changes
N/A
Comments
Comment #2
joseph.olstadComment #3
joseph.olstadComment #4
joseph.olstadComment #5
joseph.olstadComment #7
joseph.olstad5.6.x also needs this.
With that said, I've accelerated an upstream fix, contacted both maintainers of ckeditor_codemirror with a solution on a silver platter.
Maybe hold off a few days , we'll probably get a patchless fix that allows us to pin to a new minimal ckeditor_codemirror. We'll make a new issue to replace the patch for 6.2.x when the time comes.
#3531472: Drupal 10.5 / 11.2 incompatibility
Comment #8
joseph.olstadthis was fixed upstream. I'll make a new ticket to unwind our patch.
Comment #10
joseph.olstadactually, see the composer-extdeps PR in the related issue, I'll link it here.
Comment #11
joseph.olstadFollow-up here:
#3572356: revert codemirror patch and update composer-extdeps
Comment #12
joseph.olstadComment #13
joseph.olstadOk the patch was applied, however upstream was fixed and now we need to back off this patch after merging the composer-extdeps solution. I'll mark this as fixed and we can switch over to the other ticket.
Comment #15
smulvih2Comment #17
joseph.olstadThe codemirror upgrade isn't working out so well. Perhaps we were better off with patching 5.65.8
Explanation: Lots of markup in a ckeditor5 editor
maximize the editor in source mode.
Now try to scroll down. Cannot go down to the lower part of the markup.
Appears to be a javascript issue.
I don't recall seeing this with 5.65.8 patched, however will have to try it again myself to be sure.
Assigning this to myself, making it high priority.
Comment #18
joseph.olstadstill investigating , might not be any issue with vanilla wxt, will check.
Comment #19
joseph.olstadReviewed this upgrade, it's good, the issue I noticed was an edge case related to having a small amount of markup (drupal-embed elements) and a large amount of content in non-source mode.
The editor is working well.