CodeMirror: Extensible code editor component for the web
codemirror.net
codemirror.net
Basic actions like setting text, reading changes, setting selections and diagnostics took a lot more steps that I anticipated. Instead of setting text with a method, you need to create a transaction with text action and dispatch it to the editor instance.
Some more sophisticated actions like highlight regions require creating custom plugins.
In addition to that, all of these were not trivial and documentation was lacking fundamental concepts you need to understand to use its API.
Footprint, performance and typescript support are great though.
It did help that we wrote our compiler in Rust and were able to transpile it to WASM :)
https://github.com/ChromeDevTools/devtools-frontend/blob/mai...
But if you want an example of async completion, I do it here
https://github.com/AlexErrant/Pentive/blob/fe86a8a185e4be470...
which is called from here
https://github.com/AlexErrant/Pentive/blob/fe86a8a185e4be470...
Perf isn't really a problem for me since I'm calling SQLite in the browser; it's maybe 10-20ms.
Monaco would be okay, if not for mobile..
https://discuss.codemirror.net/t/codemirror-6-and-typescript...
or this package