Rosey / markdown-draft-js

A tool to convert content created in DraftJS to markdown and vice versa.
https://rosey.github.io/markdown-draft-js/
MIT License
318 stars 69 forks source link

Add support for hr in markdown-to-draft #97

Closed martingregoire closed 5 years ago

martingregoire commented 5 years ago

When converting markdown to Draft.js raw object using remarkable, support the 'hr' block type given by remarkable, and allow the user to pass an option blockTypes containing a hr key telling markdown-to-draft which block type to use.

see #96

Rosey commented 5 years ago

Thanks very much, I've been wanting to add this as well 🙂 🙌

Before I merge I want to make sure we have it going both ways, as I don't like the idea of markdown converting correctly to draft but not vice-versa. I'll try to get to that very soon 😬

Rosey commented 5 years ago

Actually, since HR requires a custom block renderer I think I'll just merge this as-is and people can pass in their blocktype arguments as you have in the test. Thanks again!

Rosey commented 5 years ago

Released as 1.4.1 🙂