Open ghost opened 10 years ago
I was using showdown.js until recently, but I want to try out markdown-js. Is it possible to render something like this:
showdown.js
^^http://youtube.com/watch?v=somestring
into this:
<iframe src=//www.youtube.com/embed/somestring?rel=0 frameborder=0 allowfullscreen></iframe>
There is an extension for this on showdown, I am not sure how to extend this parser.
To do this you should create a new dialect and then add a new block level matcher which checks for a block starting with ^^. I suggest looking at how the Maruku dialect extends the Gruber dialect for reference.
^^
I was using
showdown.js
until recently, but I want to try out markdown-js. Is it possible to render something like this:into this:
There is an extension for this on showdown, I am not sure how to extend this parser.