Using cdn https://cdn.jsdelivr.net/npm/marked/marked.min.js
Markdown flavor: Default
The project I'm talking about is live at https://nikhilmwarrier.github.io/yellowboard/
Source code: github.com/nikhilmwarrier/yellowboard
Whatever you type into a contenteditable div is saved into browser localstorge as plain text.
Whenever the page loads, JS checks localstorage for things last saved and it is parsed using marked. Then it is displayed on the aforementioned contenteditable div using innerHTML, thus displaying formatted text. Or anyway, that was the plan.
It works, but only on the first line of text on the div.
Test it on this link: https://nikhilmwarrier.github.io/yellowboard/
What did you type in to make it not work? It seems to work for me.
Just a guess but the issue probably has to do with the fact that html blocks in markdown are terminated by the first empty line.
And you are saving markdown then converting it to html then saving that html and running it through marked again.
Thanks for responding...
Actually, whatever I type gets converted to markdown only if it's in the first line...
it works for me for more than just the first line

I am pretty sure I am annoying you by this point, but I still can't get this to work. Here is my screen record.
I'm sorry for the video quality, but it's night now at where I live and I had multiple eye-comfort filters on, which also got recorded...
look at what is in the cache after the first refresh. As I said above you are converting it to html then running the html through marked on the second refresh.
According to the spec html blocks in markdown are not converted but left as is.
I don't think that project will work unless you can figure out how to know which parts have already been converted by marked to html and which parts haven't.