Sha256: 42a2ed88257a904c0ce264d1e204b4c16d9c2b27581dba3514ac0ccca561b913

Contents?: true

Size: 1.73 KB

Versions: 17

Compression:

Stored size: 1.73 KB

Contents

# wysihtml5x for Rails

[Edicy/wysihtml5x](http://edicy.github.io/wysihtml5/) 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 wysihtml5x to Rails assets pipeline.

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'wysihtml5x-rails'
```

Or you can install from latest build:

```ruby
gem 'wysihtml5x-rails', :git => 'https://github.com/Edicy/wysihtml5x-rails.git'
```

And then execute:

```sh
bundle
```

Or install it yourself as:

```sh
$ gem install wysihtml5x-rails
```

## Usage

Require it in your JS manifest's file `application.js`:

```js
//= require wysihtml5x
```

or if you need wysihtml with built-in toolbar:

```js
//= require wysihtml5x-toolbar
```

Additionally include predefined `simple`, `advanced` or `advanced_unwrap` parsing rules in your `application.js`:

```js
//= require parser_rules/advanced_unwrap
```

Additionally include predefined `wysihtml5x` stiles in your `application.css.scss` file:

```scss
*= require wysihtml5x
```

The simple initialise:

```html
<script>
   var editor = new wysihtml5.Editor("wysihtml5-textarea", { // id of textarea element
      toolbar:      "wysihtml5-toolbar", // id of toolbar element
      stylesheets:  "<%= stylesheet_path('wysihtml5x') %>", // optional, css to style the editor's content
      parserRules:  wysihtml5ParserRules, // 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

17 entries across 17 versions & 1 rubygems

Version Path
wysihtml5x-rails-0.5.0.beta1 README.md
wysihtml5x-rails-0.4.17 README.md
wysihtml5x-rails-0.4.16 README.md
wysihtml5x-rails-0.4.15 README.md
wysihtml5x-rails-0.4.14 README.md
wysihtml5x-rails-0.4.13 README.md
wysihtml5x-rails-0.4.12 README.md
wysihtml5x-rails-0.4.11 README.md
wysihtml5x-rails-0.4.10 README.md
wysihtml5x-rails-0.4.9 README.md
wysihtml5x-rails-0.4.8 README.md
wysihtml5x-rails-0.4.7 README.md
wysihtml5x-rails-0.4.6 README.md
wysihtml5x-rails-0.4.5 README.md
wysihtml5x-rails-0.4.4 README.md
wysihtml5x-rails-0.4.1 README.md
wysihtml5x-rails-0.4.0 README.md