Logseq has an Android app and clients for the usual desktop platforms. It stores as .md files. It meets your requirements. I’m not sure why you’re focused on Firefox support?
One I have my eye on is Silverbullet.md. the creator recently promoted it here and it has some nice ideas. It’s a web app that you self host. Behind the scenes everything is stored in .md files.
This is my favorite of the thread.
You can even call one Host, haha.