tommoor / slate-md-serializer

A Markdown serializer for the Slate editor framework
MIT License
64 stars 36 forks source link

Could this module handle inline images? #29

Open notten13 opened 5 years ago

notten13 commented 5 years ago

Hi,

I've noticed that this module only serialises image nodes when they have the block type (I found this in renderer.js, the case for images is in the rule that deals with blocks). I think in the Markdown spec (I'm talking about commonMark, it might not be the one this module supports?), it's possible to have inline images.

Is this intentional? Would there be a case for modifying renderer.js to handle inline image nodes?

Thanks!

tommoor commented 5 years ago

It's intentional as this module is designed to work well with rich-markdown-editor

However I'd be more than happy to merge such an addition to this project so long as it has matching tests and remains backwards compatible with images that are blocks (I'd imagine for the purposes of separation it would be image syntax that's separated by newlines?)