Skip to content

mbaev/md_simple_editor

 
 

Repository files navigation

MarkDown Simple Editor

Installation

Add this line to your application's Gemfile:

gem 'md_simple_editor'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install md_simple_editor

Usage

In your application.css, include the css files:

*= require md_simple_editor

In your application.js, include the javascript files:

//= require md_simple_editor

Helper

There are a helper that make your textarea works like a text editor :D

<%= md_simple_editor  do %>
    <%= text_area_tag "your id" %>
<% end %>

Also you can use inside a form

<%= form_for @user do |f|
    <%= md_simple_editor  do %>
        <%= f.text_area :description %>
    <% end %>
<% end %>

You can change the size of the buttons using bootstrap classes btn-sm, btn-xs, btn-lg

<%= md_simple_editor('btn-xs')  do %>
    <%= text_area_tag "your id" %>
<% end %>

Version 0.1.8

Simple markdown editor meets Bootstrap, more elegant look and feel, !and now, the preview mode is OUT"

How it looks?

Imgur

Imgur

ToDo

  • Add functions to extend the toolbar
  • Add some internationalization options

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Very simple markdown editor for rails

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE.txt

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 37.8%
  • Ruby 37.5%
  • CoffeeScript 24.7%