https://github.com/rderoldan1/md_simple_editor
Very simple markdown editor for rails
https://github.com/rderoldan1/md_simple_editor
markdown rails ruby
Last synced: 9 months ago
JSON representation
Very simple markdown editor for rails
- Host: GitHub
- URL: https://github.com/rderoldan1/md_simple_editor
- Owner: rderoldan1
- License: mit
- Created: 2014-01-14T20:53:40.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2019-10-08T14:15:52.000Z (over 6 years ago)
- Last Synced: 2025-05-13T13:13:59.263Z (9 months ago)
- Topics: markdown, rails, ruby
- Language: CSS
- Homepage: http://rderoldan1.github.io/md_simple_editor
- Size: 59.6 KB
- Stars: 65
- Watchers: 4
- Forks: 33
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# MarkDown Simple Editor
## Installation
Add this line to your application's Gemfile:
gem 'font-awesome-rails'
gem 'md_simple_editor'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install font-awesome-rails
$ gem install md_simple_editor
## Usage
In your `application.css`, include the css files:
*= require font-awesome
*= require md_simple_editor
Or if you using SCSS, include in `application.css.scss`:
@import "font-awesome";
@import "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_
```rails
<%= md_simple_editor do %>
<%= text_area_tag "your id" %>
<% end %>
```
Also you can use inside a form
```rails
<%= 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`
```rails
<%= 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?


## 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