Complete starter example with view

Hello. I wanted to access my codemirror view and change its content like in Examples. Additionally, I needed to put codemirror view into a specific place in my index.html. It turned out, one just needs to write export const view in the file where one’s view is declared. This is how it was in my case. And to select an appropriate place, one needs to write querySelector with the target div id. Yes, in accordance with documentation. Hope it helps other noobies like me.

Btw, I didn’t find that many working demos with codemirror 6 and Lezer. Here are some of them.
Wren
Lezer
Clojure
nix