-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit with wysihtml5x v0.4.0-beta2
- Loading branch information
0 parents
commit b5a6d40
Showing
14 changed files
with
18,616 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
*.gem | ||
*.rbc | ||
.bundle | ||
.config | ||
.yardoc | ||
Gemfile.lock | ||
InstalledFiles | ||
_yardoc | ||
coverage | ||
doc/ | ||
lib/bundler/man | ||
pkg | ||
rdoc | ||
spec/reports | ||
test/tmp | ||
test/version_tmp | ||
tmp | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in wysihtml5x-rails.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2013 Tanel Jakobsoo | ||
|
||
MIT License | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# 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 pure wysihtml functionality without toolbar: | ||
|
||
```js | ||
//= require wysihtml5x-wotools | ||
``` | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require "bundler/gem_tasks" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
require "wysihtml5x/rails/version" | ||
|
||
module Wysihtml5x | ||
module Rails | ||
class Engine < ::Rails::Engine | ||
isolate_namespace Wysihtml5x::Rails | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module Wysihtml5x | ||
module Rails | ||
VERSION = "0.4.0" | ||
end | ||
end |
Oops, something went wrong.