-
Notifications
You must be signed in to change notification settings - Fork 11
Description
My attempt at describing this feature:
Code that embeds CodeMirrorBlocks can use codemirror's api to create text markers. This feature preserves those markers when switching back and forth between block mode and text mode.
This feature doesn't have any tests, and based on my manual inspection of the code, is completely broken, so I'm going to remove it since it's making other code harder to refactor.
I also think we should change the way the codemirror instance is created. Instead of creating it ourselves from inside react components, and then bubbling the instance back up to the top, we should instead create it at the top and pass it down. Then when switching between block mode and text mode, we would actually just keep using the same codemirror instance instead of creating a new one, completely obviating the need to manually copy state between the old and new instances.