Skip to content

rh/pagedown-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

PageDown for the Rails asset pipeline

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages