0.03
No commit activity in last 3 years
No release in over 3 years
PageDown for the Rails asset pipeline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

pagedown-rails

PageDown for the Rails asset pipeline.

Installation

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
 */

To create markdown editor:

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>

What's included?

  • markdown.converter
  • markdown.sanitizer
  • markdown.editor
  • css styles

Copyright Richard Hubers, released under the MIT License.