This seems nearly identical to Heynote[0], which was also on HN[1]. Even the example blocks share some content with that used as an example in the screenshot on the Heynote homepage (and I think in the app too)
[0]: https://heynote.com/[1]: https://news.ycombinator.com/item?id=38733968
Initial note storage is in localStorage. To switch to disk: right-click for context menu, `Notes storage` / `Move notes from browser to directory`.
Then choose a directory on disk and we will do one time migration from localStorage => disk.
You can then switch to another directory (some apps call it a "workspace"). Because why not.
Encryption is probably the next feature I'll add because I want to store secrets in my notes and I'll feel better if those notes are encrypted.
More docs: https://edna.arslexis.io/help
Multiple notes is pretty big addition. I loved the concept and implementation of blocks in Heynote but a single note was a deal breaker for me.
I've also added some UI like right-click context menu for discoverability, ability to enable spell checking.
And I'm really trying to optimize for speed of use, including speed of switching between notes.
For example you can assign Alt + 0 .. Alt + 9 as note quick access shortcuts.
By default I create 3 notes: scratchpad, daily journal and inbox and they get Alt + 1, Alt + 2, Alt + 3 quick access shortcuts but you can assign them to any page you want.
I've been thinking about more featureful markdown note taker that would support images and more.
I've started on such a thing but stalled. It's way more work. The good thing about Edna is that I spent less than a month adding the features I wanted to Heynote fork.
The current version is at https://notedapp.dev/ but don't use it for actual notes.
I love the math block. Is there a way to reference a variable elsewhere, or fetch data online? Then you could build a little personal dashboard with it.
I was thinking about making math more like a mode i.e. make it available in every block type, as opposed to it's own block type.
Then it would be active in plain text, markdown and even code blocks.
As to data fetching - falls a bit outside of scope.
I wanted multiple notes and I didn't get why it was made as a desktop app first given that all functionality to implement it is available in a browser (well, Chrome).
So I forked it and added those features.
Been using it daily so it was worth it.
Mostly it supports multiple notes and it's a web app, not a desktop app.
I could build a desktop app but it would not offer almost any advantages given that Edna can also save notes on disk (that's how I use it).
You can use Chrome's "Install" feature to make it look act like a native app (it opens in it's own window and acts independently of the browser).
So Edna either stores notes in localStorage or in a directory of your choosing on disk.
In Edna you can right-click for context menu to switch between localStorage and disk.
If you ask: "how do the browser APIs work", you can look at https://github.com/kjk/edna/blob/main/src/fileutil.js
Basically, there's `window.showDirectoryPicker()` to ask user for permission to access directory (either read only or read write). And then using that directory handle you can read list of files, read / write files or create new files.
History not repeating but rhyming, I suppose...
Anyway, thanks for this. I've just added it to my bookmarks.
What I know about Codemirror I mostly learned by reading other people's code so I suggest that.
Specifically code of silverbullet: https://github.com/silverbulletmd/silverbullet/tree/main/web... (and a few other directories there).
It implements very advanced Markdown mode, lots of code to learn from.
It does support multiple pages but you can use just one.
It has a nifty feature in that you can divide the single file into virtual parts. They just have alternate backgrounds to tell them apart. And each virtual part can have a type for syntax highlighting (plain text, markdown or a programming language).
I've been using it for a few months now and it's my primary note taking / knowledge recording thing.
Even though it's web based, on Chrome you can save notes on disk so it works like a desktop app.
Each note is a plain text file so you can edit them in any text editor.
If you put notes on a shared drive (Dropbox, OneDrive, Google Drive etc.) you can work on notes on multiple computers.
It's also open-source: https://github.com/kjk/edna