react-markdown icon indicating copy to clipboard operation
react-markdown copied to clipboard

Suggestion: allow 'plugins'

Open codingmatty opened this issue 10 years ago • 9 comments

It would be awesome if we could add our own markdown.

For example, I like strikethrough, but it's not part of the CommonMark markdown spec, so I'd love to be able to add it. (Note: I don't want to allow HTML, so adding this would be a safer option)

~strike this~ ==> strike this

codingmatty avatar Aug 20 '16 14:08 codingmatty

Agreed, would make a good addition. I've been wanting to replace the parser with something non-commonmark for a while, which would make this easier. Don't currently have time to implement it, but thanks for the suggestion. Will see if I get around to it at some point.

rexxars avatar Sep 13 '16 19:09 rexxars

Double this, it will be a super nice feature. I use react-markdown in my personal blog service and I want to show "cuts" in the markdown preview:

>Read more< ==> <a href="fullPostUrl">Read more</a>

If you have no time, maybe we can help you a bit? I'm not very experienced developer, but I'd like to help.

riseremi avatar Jan 14 '17 12:01 riseremi

Now that github is using CommonMark, do you still want to change the parser to something non-commonmark?

tauren avatar Mar 21 '17 23:03 tauren

The commonmark parser we're using still doesn't support Github Flavored Markdown, even if Github Flavored Markdown is now based on it. If the commonmark parser supported GFM, I might reconsider, but I'm still thinking of switching.

rexxars avatar Mar 28 '17 17:03 rexxars

Why not use https://www.npmjs.com/package/marked? It supports GFM since ages.

pke avatar Apr 21 '17 13:04 pke

If plugins completed, is code coloring close in? 😆

CyanGlory avatar Sep 07 '17 09:09 CyanGlory

Bumping for interest. I am using this package for a travel blog for me and the mrs and want to use markdown to make it easier for her to edit without writing actual html. I want to have different colours styles for when either me, or her, write something. For now I added a custom renderer for the inline code tag which takes: J:Hello and treats the J (or other letter) as the initial for our names and then add the appropriate react component to achieve the style I want. While this works, it's obviously not ideal, so some sort of plugin system would be fantastic.

MartinWebDev avatar Oct 08 '17 06:10 MartinWebDev

Hmm, the demo page says it implements GFM, which seems to oppose what this thread says - might be worth updating :)

jasiekmiko avatar Dec 06 '17 12:12 jasiekmiko

We support remark parser plugins now and have some basic building blocks for ast plugins as well. Closing.

rexxars avatar May 08 '18 16:05 rexxars