Is it possible to use the Redcarpet Markdown library to automatically embed youtube videos from youtube share links? If so anyone got any ideas on how to go about it? (I’m using Ruby/Rails 3.2)
Is it possible to use the Redcarpet Markdown library to automatically embed youtube videos
Share
Sure it is, you can override the method .to_html, but you probably dont need to even extend it you could instead do something like this;
That would replace any instace of
[youtube YOUTUBE_ID]with your custom html.