This is just a fun project I made while being frustrated at codemirror because of it's complexity. It is very open in how you use it, in-fact, the draw proc lets you insert DOM nodes directly, so you have all the freedom!
Quill is meant to be easy to use and give lots of freedom. If you want to make a code-editor, you can use whatever js-compatible parsing library you want. All you have to do is take the input string and make html.
For more information read the docs here
Installation:
nimble install https://github.com/thatrandomperson5/Quill
Note: I have not released this on nimble because I want some general feedback first
Any feedback is appreciated, there are probably plenty of bugs, and I hope this library is helpful.
This looks pretty cool, thanks for making it and sharing!
I cannot find the nim code to generate the behaviour in the live demo (I even searched for "newline" in the repo), is it anywhere in the repo?
It would be cool to have a demo where the editor highlight correctly nim code. One could use a function from nimib that takes nim code and returns it with highlight.js compatible span classes, see: https://github.com/pietroppeter/nimib/blob/2e0c2223cef10423fc43fc3be9626890a6bb4779/src/nimib/highlight.nim#L73
Very interesting, because I was trying to make some small PoC of the text editor and wanted to make demo in browser, but TUI happened to be easier to choose.
Will try to switch into you lib
I just checked the function from nimib, and that file is not compatible with nim js,
Huh that is weird, I was expecting code there to be fairly tame and the imports too (from stdlib) I was expecting them to work in js