Hello, I’m very excited about all the work happening here in Codemirror6!
One problem that I’m having is that I’m finding it quite hard to see complete examples on how to use Codemirror 6. The examples section on the website doesn’t show the source code, and also, on the documentation, I barely see any examples. The guides have code, but only in fragments.
As pointed out by Mike Bostock (D3 Author) in this recent excellent post, teaching is fundamental, and examples go a long way. Saying in short, if you give me a code example, I can read it and figure out the pieces, navigate to sources, I can learn from them. But when it’s just text, I have to guess what API’s the writer is talking about and how do I connect these pieces, all of which are present in examples but hardly on the text description.
I think this should also be considered when replying to messages here. Giving full examples is a great way to answer a question when possible. For instance, I’m currently trying to figure out how to place an editor and sync some React state. This, to me, sounds like a straightforward operation. I should listen to some events and extract the new text to put somewhere else. I found this topic here CodeMirror 6: Proper way to listen for changes - #9 by raldone01 with a discussion around that, but a lot of posts and no full example. It’s probably straightforward for someone familiar with CM6, but it’s not for someone just starting on CM6.
If there are examples somewhere and I didn’t found, sorry for the big text, I would love to know where to find those!