Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A MarkDown TextEditor with jQuery and Markitup! and redcarpet

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 lib
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 rails_markitup.gemspec
README.markdown

A MarkDown TextEditor with jQuery and Markitup! and redcarpet for Rails 3

use: Markitup and Redcarpet

Demo

Support Env:

Rails3.0.8+/Ruby1.8.7+

Usage:

you need install pygments

easy_install pygments

a. In Gemfile:

gem "redcarpet"
gem "albino"
gem "nokogiri"
gem 'rails_markitup'

b. Then run :

rails g rails_markitup:install

c. In layout:

= stylesheet_link_tag :markitup
= javascript_include_tag :markitup

or you can use another highlight css:

= stylesheet_link_tag :markitup_shiny

d. In your textarea , simple_form_for exapmle:

= form.input :content, :as => :text, :input_html => {:id => 'markdown'} 

e. In your application.js:

$(document).ready(function(){
  $('#markdown').markItUp(myMarkdownSettings);
});

f. In your show page:

= markdown(@topic.content)

if you use shiny style

= markdown(@topic.content, 'shiny')
Something went wrong with that request. Please try again.