hoist-react icon indicating copy to clipboard operation
hoist-react copied to clipboard

Update `codemirror -> 6.x`

Open amcclain opened this issue 2 years ago • 1 comments

Thought this might be a drop-in upgrade as changes in https://github.com/codemirror/basic-setup/blob/main/CHANGELOG.md looked minimal, but I believe something might have changed with their default exports. Needs a bit of a closer look.

amcclain avatar Jul 21 '22 10:07 amcclain

Changes from version 5 to 6 are major.

Version 6 exposes only modules, and the entire library has been split into separate packages, requiring more manual configuration. Other changes that I am aware of: events are handled differently, functionality and decoration is passed to the editor through extensions (I believe similar to editorSpec in the v5 hoist version but implemented differently), and the fromTextArea method is no longer supported (although the docs do provide a function with similar behavior).

Some documentation specifically about version 5 to 6 migration is available here in addition to the normal docs, which are quite thorough.

PeteDarinzo avatar Aug 08 '22 21:08 PeteDarinzo