Project

wmd-rails

0.01
No commit activity in last 3 years
No release in over 3 years
WMDEditor for rails 3.1 or higher
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.1.1
 Project Readme

WMD Editor for rails

Using assets pipeline, base on https://github.com/chloerei/wmd version, witch fork from https://github.com/ChiperSoft/wmd .

History

Original WMD and Showdwon code copyright (c) 2007 John Fraser
Modifications and bugfixes (c) 2009-2010 Chris Jester-Young, Dana Robinson, Anand Chitipothu
Further modifications (c) 2010-2011 Jarvis Badgley, Wenqiang Wang, Helder Ribeiro, Chad Burggraf

Dependency

Rails 3.1 or higher

Install

In you Gemfile

gem 'wmd-rails'

Then bundle install

Usage

In app/assets/javascripts/editor.js or other js

//= require wmd/wmd
//= require wmd/showdown

$(function(){
  new WMDEditor({
    input: "editor-input",
    button_bar: "editor-button-bar",
    preview: "editor-preview",
    helpLink: "http://daringfireball.net/projects/markdown/syntax"
  });
})

More wmd document: https://github.com/chloerei/wmd

In app/assets/stylesheets/editor.css or other css

/*
 *= require 'wmd/wmd'
*/

Precompile (optional)

In config/application.rb

config.assets.precompile += %w(editor.js editor.css)

Then rake assets:precompile

LICENSE

MIT-LICENSE