PageDown for the Rails asset pipeline.
Add this line to the assets group in your Gemfile:
gem 'pagedown-rails', '~> 1.1.4'
Add the necessary libraries to app/assets/javascripts/application.js
:
//= require markdown.converter
//= require markdown.sanitizer
//= require markdown.editor
Add the necessary libraries to app/assets/stylesheets/application.css
:
/*
*= require markdown
*/
var converter = Markdown.getSanitizingConverter();
var editor = new Markdown.Editor(converter);
editor.run();
<div class='wmd-panel'>
<div id='wmd-button-bar'></div>
<textarea class='wmd-input'></textarea>
</div>
- markdown.converter
- markdown.sanitizer
- markdown.editor
- css styles
Copyright Richard Hubers, released under the MIT License.