This gem gives you instant markdown preview for any textarea you want, anywhere in your application.
Add to your Gemfile:
Include the assets where you want them
//= require markdown_preview/base
(Optional) If you want to override the preprocessor then add the following to
module MarkdownPreview #Write your own preprocessor here if you want to #the md param is the incoming markdown text, before it has been processed def self.preprocess_markdown( md ) md end end
markdown_previewclass to any textareas you want to be previewable, and you're good to go!
<textarea class="markdown_preview" id="my_awesome_textarea"></textarea>
Desiring God Ministries