md-block icon indicating copy to clipboard operation
md-block copied to clipboard

Shame that you have abandoned this project!

Open odebroqueville opened this issue 1 year ago • 2 comments

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.

odebroqueville avatar Apr 07 '23 17:04 odebroqueville

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?

LeaVerou avatar Apr 08 '23 04:04 LeaVerou

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.

odebroqueville avatar Apr 09 '23 19:04 odebroqueville