I posted my program from last night on Gitlab in this new repo.
My program doesn't do much, and it's obviously not useful to anyone else. It shows you what I learned in the bit of time I put into it last night.
It (sort of) lets you move between two divs, with a box around the active div, using the up and down arrows. You can indent the active div (when it works) with the right arrow. That's it. As I said, it's definitely not anything useful at this point.
It's interesting to me the way you can manipulate the dom. My end goal is going to be an outliner type of notes app with these features:
- Do quick outlining.
- Add and edit text entries.
- Indent/outdent text trees (a text entry box and all of its children) using the keyboard.
- Rearrange text trees using the keyboard.
- Markdown support for text entries, including math.
- Save the current state to a file manually as a new html file.
- Optionally, run a local web server, which would make the saving and loading more convenient.
- Use a version system to determine if the current version in localStorage is newer than the version I'm loading from file. I think timestamps will work for this.
I want to be able to add a quick outline to a repo without a lot of ceremony. With everything in one html file, all I'll have to do is load that file into the browser and start typing. As I said earlier, I probably won't actually use this for anything, but I will learn a lot by implementing these features.