Sha256: 780f05f1822d0d85bae1e98e3bd3a476c17e8ec6fc5089291a1d7483fa3178b3
Contents?: true
Size: 1.82 KB
Versions: 2
Compression:
Stored size: 1.82 KB
Contents
# wysihtml for Rails [Voog/wysihtml](https://github.com/Voog/wysihtml) is an extended and less strict approach on [xing/wysihtml5](http://xing.github.io/wysihtml5/) open source rich text editor based on HTML5 technology. This gem adds wysihtml to Rails assets pipeline. ## Installation Add this line to your application's Gemfile: ```ruby gem 'wysihtml-rails' ``` Or you can install from latest build: ```ruby gem 'wysihtml-rails', :git => 'https://github.com/Voog/wysihtml-rails.git' ``` And then execute: ```sh bundle ``` Or install it yourself as: ```sh $ gem install wysihtml-rails ``` ## Usage Require it in your JS manifest's file `application.js`: ```js //= require wysihtml ``` or if you also need toolbar, table editing features or all commands: ```js //= require wysihtml //= require wysihtml/toolbar //= require wysihtml/all_commands //= require wysihtml/table_editing ``` Additionally include predefined `simple`, `advanced` or `advanced_unwrap` parsing rules in your `application.js`: ```js //= require wysihtml/parser_rules/advanced_unwrap ``` Additionally include predefined `wysihtml` stiles in your `application.css.scss` file: ```scss *= require wysihtml ``` The simple initialise: ```html <script> var editor = new wysihtml.Editor("wysihtml-textarea", { // id of textarea element toolbar: "wysihtml-toolbar", // id of toolbar element stylesheets: "<%= stylesheet_path('wysihtml') %>", // optional, css to style the editor's content parserRules: wysihtmlParserRules, // defined in parser rules set //showToolbarAfterInit: false }); </script> ``` ## 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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wysihtml-rails-0.6.0.beta2 | README.md |
wysihtml-rails-0.6.0.beta | README.md |