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

feat: allow custom config to the marked instance #9

Open seanwuapps opened 2 years ago

seanwuapps commented 2 years ago

allow consuming apps to customize the marked instance.

netlify[bot] commented 2 years ago

Deploy Preview for md-block ready!

Name Link
Latest commit bf6ec373525cd3168d3a3eb82f4947c5e31b03dc
Latest deploy log https://app.netlify.com/sites/md-block/deploys/626e01731461df0009aea02a
Deploy Preview https://deploy-preview-9--md-block.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

seanwuapps commented 2 years ago

Hi there, thank you for working on this! To better think about whether this is the right solution, could you list a few use cases? (I imagine you've needed to customize things yourself, so I'd love to hear what kinds of customizations you needed)

I'm in process of building a web component ui library and wanted to integrate the md-block to render custom tags, rather than the default html output.

Happy to reject this if that's out of the normal use cases, i think it's just the md-block's api aligns well with my thinking so didn't wanna reinvent the wheel :)

LeaVerou commented 2 years ago

No, the use case is definitely valid! We just need to think a bit more about what's the best way to address it, but I'm definitely interested in addressing it!

seanwuapps commented 2 years ago

@LeaVerou updated pr with hook, please have a look, let me know if I'm doing it wrong.