See this: https://foambubble.github.io/foam/
Our gsoc student is working on the markdown converter. Let’s have a markdown converter first.
I don’t mean to suggest that you import/export Foam but rather to have a TeXmacs feature that works like this for taking notes.
Maybe the WebAssembly technology can be used to port TeXmacs to web. Then it can cooperate with something like Foam.