LeaVerou / md-block

A custom element for rendering stylable (light DOM) Markdown
https://md-block.verou.me
MIT License
322 stars 17 forks source link

Shame that you have abandoned this project! #15

Open odebroqueville opened 1 year ago

odebroqueville commented 1 year ago

I tried using this in a Chrome extension to render Markdown from ChatGPT code boxes. It was a real nightmare and I couldn't even get it to work. The links to marked, prism and I think it was DOMpurify, all need updating! In the end I just used a userscript for TamperMonkey.

LeaVerou commented 1 year ago

It would help to address this issue if you provided more details. What was a real nightmare? What happened? Why did you conclude that the links need updating?

odebroqueville commented 1 year ago

Sorry for the delay. I've been busy trying to get my Chrome extension to work using marked. If you'd like to try it out: Markdown for ChatGPT

One of the issues I had with md-block was that I had installed via npm and had to use webpack to get things to work. Then I encountered issues related to commonJS modules vs ES6 modules and properly setting the webpack config files. Once I sorted that out, I got an error message concerning the outdated links and then another error message that had to do with the customElements define statements.

I also noticed that marked had been updated and should now be using marked.parse instead of just marked.

I gave up using md-block because I couldn't understand your code, namely things like let marked = window.marked!

Feel free to close this comment. At least I learnt something new, i.e. custom elements! Thank you.