BearToCode / carta

A lightweight, fast and extensible Svelte Markdown editor and viewer.
https://beartocode.github.io/carta/
MIT License
313 stars 14 forks source link

Add components mapping. #74

Closed minhnbnt closed 2 days ago

minhnbnt commented 3 weeks ago

Is there an easy way to convert components to other like renderers in svelte-markdown or react-markdown.

I want to add a copy button in pre blocks but writing unified plugins seems too hard for me.

BearToCode commented 3 weeks ago

Hi, I checked out svelte-markdown and it looks really cool. It would be great to have something like that here, since it is often requested and would make rendering components easier.

Here are some ideas for the implementation, for future me or anyone who might want to start working on this :)

It would be cool to make it into a dedicated plugin, but weird things might happen if this plugin's transformer is not run last.