wysiwyg-rails 4.0.1 → 4.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -21
- data/README.md +148 -148
- data/Rakefile +5 -5
- data/app/assets/javascripts/froala_editor.min.js +2 -2
- data/app/assets/javascripts/froala_editor.pkgd.min.js +2 -2
- data/app/assets/javascripts/languages/ar.js +3 -3
- data/app/assets/javascripts/languages/bs.js +3 -3
- data/app/assets/javascripts/languages/cs.js +3 -3
- data/app/assets/javascripts/languages/da.js +3 -3
- data/app/assets/javascripts/languages/de.js +3 -3
- data/app/assets/javascripts/languages/el.js +3 -3
- data/app/assets/javascripts/languages/en_ca.js +3 -3
- data/app/assets/javascripts/languages/en_gb.js +3 -3
- data/app/assets/javascripts/languages/es.js +3 -3
- data/app/assets/javascripts/languages/et.js +3 -3
- data/app/assets/javascripts/languages/fa.js +3 -3
- data/app/assets/javascripts/languages/fi.js +3 -3
- data/app/assets/javascripts/languages/fr.js +7 -3
- data/app/assets/javascripts/languages/he.js +3 -3
- data/app/assets/javascripts/languages/hr.js +3 -3
- data/app/assets/javascripts/languages/hu.js +3 -3
- data/app/assets/javascripts/languages/id.js +3 -3
- data/app/assets/javascripts/languages/it.js +3 -3
- data/app/assets/javascripts/languages/ja.js +3 -3
- data/app/assets/javascripts/languages/ko.js +1 -1
- data/app/assets/javascripts/languages/ku.js +3 -3
- data/app/assets/javascripts/languages/me.js +3 -3
- data/app/assets/javascripts/languages/nb.js +3 -3
- data/app/assets/javascripts/languages/nl.js +3 -3
- data/app/assets/javascripts/languages/pl.js +3 -3
- data/app/assets/javascripts/languages/pt_br.js +3 -3
- data/app/assets/javascripts/languages/pt_pt.js +3 -3
- data/app/assets/javascripts/languages/ro.js +3 -3
- data/app/assets/javascripts/languages/ru.js +3 -3
- data/app/assets/javascripts/languages/sk.js +3 -3
- data/app/assets/javascripts/languages/sl.js +3 -3
- data/app/assets/javascripts/languages/sr.js +3 -3
- data/app/assets/javascripts/languages/sv.js +3 -3
- data/app/assets/javascripts/languages/th.js +3 -3
- data/app/assets/javascripts/languages/tr.js +3 -3
- data/app/assets/javascripts/languages/uk.js +3 -3
- data/app/assets/javascripts/languages/vi.js +1 -1
- data/app/assets/javascripts/languages/zh_cn.js +3 -3
- data/app/assets/javascripts/languages/zh_tw.js +3 -3
- data/app/assets/javascripts/plugins/align.min.js +1 -1
- data/app/assets/javascripts/plugins/char_counter.min.js +1 -1
- data/app/assets/javascripts/plugins/code_beautifier.min.js +1 -1
- data/app/assets/javascripts/plugins/code_view.min.js +1 -1
- data/app/assets/javascripts/plugins/colors.min.js +1 -1
- data/app/assets/javascripts/plugins/cryptojs.min.js +1 -1
- data/app/assets/javascripts/plugins/draggable.min.js +1 -1
- data/app/assets/javascripts/plugins/edit_in_popup.min.js +1 -1
- data/app/assets/javascripts/plugins/emoticons.min.js +1 -1
- data/app/assets/javascripts/plugins/entities.min.js +1 -1
- data/app/assets/javascripts/plugins/file.min.js +2 -2
- data/app/assets/javascripts/plugins/files_manager.min.js +2 -2
- data/app/assets/javascripts/plugins/font_family.min.js +1 -1
- data/app/assets/javascripts/plugins/font_size.min.js +1 -1
- data/app/assets/javascripts/plugins/forms.min.js +1 -1
- data/app/assets/javascripts/plugins/fullscreen.min.js +1 -1
- data/app/assets/javascripts/plugins/help.min.js +1 -1
- data/app/assets/javascripts/plugins/image.min.js +2 -2
- data/app/assets/javascripts/plugins/image_manager.min.js +1 -1
- data/app/assets/javascripts/plugins/inline_class.min.js +1 -1
- data/app/assets/javascripts/plugins/inline_style.min.js +1 -1
- data/app/assets/javascripts/plugins/line_breaker.min.js +1 -1
- data/app/assets/javascripts/plugins/line_height.min.js +1 -1
- data/app/assets/javascripts/plugins/link.min.js +2 -2
- data/app/assets/javascripts/plugins/lists.min.js +2 -2
- data/app/assets/javascripts/plugins/markdown.min.js +2 -2
- data/app/assets/javascripts/plugins/paragraph_format.min.js +2 -2
- data/app/assets/javascripts/plugins/paragraph_style.min.js +2 -2
- data/app/assets/javascripts/plugins/print.min.js +1 -1
- data/app/assets/javascripts/plugins/quick_insert.min.js +1 -1
- data/app/assets/javascripts/plugins/quote.min.js +1 -1
- data/app/assets/javascripts/plugins/save.min.js +1 -1
- data/app/assets/javascripts/plugins/special_characters.min.js +1 -1
- data/app/assets/javascripts/plugins/table.min.js +2 -2
- data/app/assets/javascripts/plugins/track_changes.min.js +2 -2
- data/app/assets/javascripts/plugins/trim_video.min.js +1 -1
- data/app/assets/javascripts/plugins/url.min.js +1 -1
- data/app/assets/javascripts/plugins/video.min.js +2 -2
- data/app/assets/javascripts/plugins/word_paste.min.js +2 -2
- data/app/assets/javascripts/plugins.pkgd.min.js +2 -2
- data/app/assets/javascripts/third_party/embedly.min.js +1 -1
- data/app/assets/javascripts/third_party/font_awesome.min.js +1 -1
- data/app/assets/javascripts/third_party/image_tui.min.js +1 -1
- data/app/assets/javascripts/third_party/showdown.min.js +1 -1
- data/app/assets/javascripts/third_party/spell_checker.min.js +1 -1
- data/app/assets/stylesheets/froala_editor.css +1422 -1423
- data/app/assets/stylesheets/froala_editor.min.css +2 -2
- data/app/assets/stylesheets/froala_editor.pkgd.css +4797 -4796
- data/app/assets/stylesheets/froala_editor.pkgd.min.css +2 -2
- data/app/assets/stylesheets/froala_style.css +357 -355
- data/app/assets/stylesheets/froala_style.min.css +2 -2
- data/app/assets/stylesheets/plugins/char_counter.css +44 -44
- data/app/assets/stylesheets/plugins/char_counter.min.css +2 -2
- data/app/assets/stylesheets/plugins/code_view.css +92 -92
- data/app/assets/stylesheets/plugins/code_view.min.css +2 -2
- data/app/assets/stylesheets/plugins/colors.css +93 -93
- data/app/assets/stylesheets/plugins/colors.min.css +2 -2
- data/app/assets/stylesheets/plugins/draggable.css +36 -36
- data/app/assets/stylesheets/plugins/draggable.min.css +2 -2
- data/app/assets/stylesheets/plugins/emoticons.css +29 -29
- data/app/assets/stylesheets/plugins/emoticons.min.css +2 -2
- data/app/assets/stylesheets/plugins/file.css +123 -123
- data/app/assets/stylesheets/plugins/file.min.css +2 -2
- data/app/assets/stylesheets/plugins/files_manager.css +1235 -1235
- data/app/assets/stylesheets/plugins/files_manager.min.css +2 -2
- data/app/assets/stylesheets/plugins/fullscreen.css +72 -72
- data/app/assets/stylesheets/plugins/fullscreen.min.css +2 -2
- data/app/assets/stylesheets/plugins/help.css +40 -40
- data/app/assets/stylesheets/plugins/help.min.css +2 -2
- data/app/assets/stylesheets/plugins/image.css +208 -206
- data/app/assets/stylesheets/plugins/image.min.css +2 -2
- data/app/assets/stylesheets/plugins/image_manager.css +231 -231
- data/app/assets/stylesheets/plugins/image_manager.min.css +2 -2
- data/app/assets/stylesheets/plugins/line_breaker.css +33 -33
- data/app/assets/stylesheets/plugins/line_breaker.min.css +2 -2
- data/app/assets/stylesheets/plugins/markdown.css +144 -147
- data/app/assets/stylesheets/plugins/markdown.min.css +2 -2
- data/app/assets/stylesheets/plugins/quick_insert.css +67 -67
- data/app/assets/stylesheets/plugins/quick_insert.min.css +2 -2
- data/app/assets/stylesheets/plugins/special_characters.css +28 -28
- data/app/assets/stylesheets/plugins/special_characters.min.css +2 -2
- data/app/assets/stylesheets/plugins/table.css +106 -106
- data/app/assets/stylesheets/plugins/table.min.css +2 -2
- data/app/assets/stylesheets/plugins/trim_video.css +242 -242
- data/app/assets/stylesheets/plugins/trim_video.min.css +2 -2
- data/app/assets/stylesheets/plugins/video.css +196 -196
- data/app/assets/stylesheets/plugins/video.min.css +2 -2
- data/app/assets/stylesheets/plugins.pkgd.css +3018 -3018
- data/app/assets/stylesheets/plugins.pkgd.min.css +2 -2
- data/app/assets/stylesheets/themes/dark.css +2186 -2186
- data/app/assets/stylesheets/themes/dark.min.css +2 -2
- data/app/assets/stylesheets/themes/gray.css +2186 -2186
- data/app/assets/stylesheets/themes/gray.min.css +2 -2
- data/app/assets/stylesheets/themes/royal.css +2186 -2186
- data/app/assets/stylesheets/themes/royal.min.css +2 -2
- data/app/assets/stylesheets/third_party/embedly.css +55 -55
- data/app/assets/stylesheets/third_party/embedly.min.css +2 -2
- data/app/assets/stylesheets/third_party/font_awesome.css +28 -28
- data/app/assets/stylesheets/third_party/font_awesome.min.css +2 -2
- data/app/assets/stylesheets/third_party/image_tui.css +36 -36
- data/app/assets/stylesheets/third_party/image_tui.min.css +2 -2
- data/app/assets/stylesheets/third_party/spell_checker.css +59 -59
- data/app/assets/stylesheets/third_party/spell_checker.min.css +2 -2
- data/lib/wysiwyg-rails/engine.rb +16 -16
- data/lib/wysiwyg-rails/version.rb +5 -5
- data/lib/wysiwyg-rails.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2831341b2e454d3faa0b00a2d9d5e2a58e48a2beca55f875d8e6140c891c76b
|
4
|
+
data.tar.gz: daa16c6766b06cfba52b66532cc444162202b5786ad4b3de7a4c3493bee00f39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 344570c5de06687904f768b160c62cb79108c1cc2a793946ff5d81a28c7a93a25f59dcead508be2d27bde6e456d3f9619f7cb3d3e14424034288e34840c35067
|
7
|
+
data.tar.gz: 2c1a2d80a3a85eb6290bd475c724206f3eb94c09e500a11e5435fb611f33e656a63b8b3d0daafe0f45734d4109d9c0dfb830f38a35de0ee2af247910a3461291
|
data/LICENSE
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
Copyright (c) 2015 Froala
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
1
|
+
Copyright (c) 2015 Froala
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
22
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,148 +1,148 @@
|
|
1
|
-
# Rails Froala WYSIWYG HTML Editor
|
2
|
-
|
3
|
-
[![Travis](https://img.shields.io/travis/froala/wysiwyg-rails.svg)](http://travis-ci.org/froala/wysiwyg-rails)
|
4
|
-
[![Gem](https://img.shields.io/gem/v/wysiwyg-rails.svg)](https://rubygems.org/gems/wysiwyg-rails/versions/2.1.0)
|
5
|
-
[![Gem](https://img.shields.io/gem/dt/wysiwyg-rails.svg)](https://rubygems.org/gems/wysiwyg-rails/versions/2.1.0)
|
6
|
-
[![license](https://img.shields.io/github/license/froala/wysiwyg-rails.svg)](https://rubygems.org/gems/wysiwyg-rails/versions/2.1.0)
|
7
|
-
|
8
|
-
>wysiwyg-rails provides the [Froala WYSIWYG HTML Editor](https://froala.com/wysiwyg-editor) javascript and stylesheets as a Rails engine for use with the asset pipeline.
|
9
|
-
|
10
|
-
## Installation
|
11
|
-
|
12
|
-
Add this to your Gemfile:
|
13
|
-
|
14
|
-
```ruby
|
15
|
-
gem "wysiwyg-rails"
|
16
|
-
```
|
17
|
-
|
18
|
-
and run `bundle install`.
|
19
|
-
## Usage
|
20
|
-
In your index.html.erb add
|
21
|
-
```
|
22
|
-
<script type="text/javascript" src = "../../assets/froala_editor.pkgd.min.js"></script>
|
23
|
-
```
|
24
|
-
To use third-party plugins add
|
25
|
-
```
|
26
|
-
<script type="text/javascript" src = "../../assets/third_party/font_awesome.min.js"></script>
|
27
|
-
<script type="text/javascript" src = "../../assets/third_party/embedly.min.js"></script>
|
28
|
-
<script type="text/javascript" src = "../../assets/third_party/image_tui.min.js"></script>
|
29
|
-
<script type="text/javascript" src = "../../assets/third_party/spell_checker.min.js"</script>
|
30
|
-
```
|
31
|
-
Initialize editor by adding below in body of index.html.erb
|
32
|
-
```
|
33
|
-
new FroalaEditor('#edit', {
|
34
|
-
|
35
|
-
})
|
36
|
-
```
|
37
|
-
## Options
|
38
|
-
You can pass options to editor by including these in index.html.erb
|
39
|
-
```
|
40
|
-
new FroalaEditor('#editor', {
|
41
|
-
options : value
|
42
|
-
});
|
43
|
-
```
|
44
|
-
|
45
|
-
## Include in assets
|
46
|
-
|
47
|
-
In your `application.css.scss`, include the css file:
|
48
|
-
|
49
|
-
```css
|
50
|
-
/*
|
51
|
-
@import "froala_editor.min";
|
52
|
-
@import "froala_style.min";
|
53
|
-
*/
|
54
|
-
```
|
55
|
-
|
56
|
-
If you want to use the dark theme, then you have to include `themes/dark.min.css` file too.
|
57
|
-
|
58
|
-
In your `application.js.coffee`, include the JS file:
|
59
|
-
|
60
|
-
```coffeescript
|
61
|
-
#= require froala_editor.min.js
|
62
|
-
|
63
|
-
new FroalaEditor('selector',{
|
64
|
-
|
65
|
-
});
|
66
|
-
```
|
67
|
-
|
68
|
-
If you need to use any of the [Available Plugins](https://froala.com/wysiwyg-editor/docs/plugins), then you should include those too in your `application.js.coffee` and `application.css.scss`.
|
69
|
-
|
70
|
-
```coffeescript
|
71
|
-
# Include other plugins.
|
72
|
-
#= require plugins/align.min.js
|
73
|
-
#= require plugins/char_counter.min.js
|
74
|
-
#= require plugins/code_beautifier.min.js
|
75
|
-
#= require plugins/code_view.min.js
|
76
|
-
#= require plugins/colors.min.js
|
77
|
-
#= require plugins/emoticons.min.js
|
78
|
-
#= require plugins/entities.min.js
|
79
|
-
#= require plugins/file.min.js
|
80
|
-
#= require plugins/font_family.min.js
|
81
|
-
#= require plugins/font_size.min.js
|
82
|
-
#= require plugins/fullscreen.min.js
|
83
|
-
#= require plugins/help.min.js
|
84
|
-
#= require plugins/image.min.js
|
85
|
-
#= require plugins/image_manager.min.js
|
86
|
-
#= require plugins/inline_class.min.js
|
87
|
-
#= require plugins/inline_style.min.js
|
88
|
-
#= require plugins/line_breaker.min.js
|
89
|
-
#= require plugins/line_height.min.js
|
90
|
-
#= require plugins/link.min.js
|
91
|
-
#= require plugins/lists.min.js
|
92
|
-
#= require plugins/paragraph_format.min.js
|
93
|
-
#= require plugins/paragraph_style.min.js
|
94
|
-
#= require plugins/print.min.js
|
95
|
-
#= require plugins/quick_insert.min.js
|
96
|
-
#= require plugins/quote.min.js
|
97
|
-
#= require plugins/save.min.js
|
98
|
-
#= require plugins/table.min.js
|
99
|
-
#= require plugins/special_characters.min.js
|
100
|
-
#= require plugins/url.min.js
|
101
|
-
#= require plugins/video.min.js
|
102
|
-
|
103
|
-
#= require third_party/embedly.min.js
|
104
|
-
#= require third_party/font_awesome.min.js
|
105
|
-
#= require third_party/image_tui.min.js
|
106
|
-
#= require third_party/spell_checker.min.js
|
107
|
-
```
|
108
|
-
|
109
|
-
```css
|
110
|
-
@import 'plugins/char_counter.min.css';
|
111
|
-
@import 'plugins/code_view.min.css';
|
112
|
-
@import 'plugins/colors.min.css';
|
113
|
-
@import 'plugins/emoticons.min.css';
|
114
|
-
@import 'plugins/file.min.css';
|
115
|
-
@import 'plugins/fullscreen.min.css';
|
116
|
-
@import 'plugins/help.min.css';
|
117
|
-
@import 'plugins/image_manager.min.css';
|
118
|
-
@import 'plugins/image.min.css';
|
119
|
-
@import 'plugins/line_breaker.min.css';
|
120
|
-
@import 'plugins/quick_insert.min.css';
|
121
|
-
@import 'plugins/special_characters.min.css';
|
122
|
-
@import 'plugins/table.min.css';
|
123
|
-
@import 'plugins/video.min.css';
|
124
|
-
|
125
|
-
@import 'third_party/embedly.min.css';
|
126
|
-
@import 'third_party/image_tui.min.css';
|
127
|
-
@import 'third_party/spell_checker.min.css';
|
128
|
-
```
|
129
|
-
|
130
|
-
Similar, if you want to use language translation you have to include the translation file.
|
131
|
-
|
132
|
-
```coffeescript
|
133
|
-
# Include Language if needed
|
134
|
-
#= require languages/ro.js
|
135
|
-
```
|
136
|
-
|
137
|
-
Then restart your web server if it was previously running.
|
138
|
-
|
139
|
-
## Initialize Editor
|
140
|
-
|
141
|
-
Details about initializing the editor can be found in the [Froala WYSIWYG Editor official documentation](https://www.froala.com/wysiwyg-editor/docs).
|
142
|
-
|
143
|
-
## License
|
144
|
-
|
145
|
-
The `wysiwyg-rails` project is under MIT license. However, in order to use Froala WYSIWYG HTML Editor plugin you should purchase a license for it.
|
146
|
-
|
147
|
-
Froala Editor has [3 different licenses](https://froala.com/wysiwyg-editor/pricing).
|
148
|
-
For details please see [License Agreement](https://froala.com/wysiwyg-editor/terms).
|
1
|
+
# Rails Froala WYSIWYG HTML Editor
|
2
|
+
|
3
|
+
[![Travis](https://img.shields.io/travis/froala/wysiwyg-rails.svg)](http://travis-ci.org/froala/wysiwyg-rails)
|
4
|
+
[![Gem](https://img.shields.io/gem/v/wysiwyg-rails.svg)](https://rubygems.org/gems/wysiwyg-rails/versions/2.1.0)
|
5
|
+
[![Gem](https://img.shields.io/gem/dt/wysiwyg-rails.svg)](https://rubygems.org/gems/wysiwyg-rails/versions/2.1.0)
|
6
|
+
[![license](https://img.shields.io/github/license/froala/wysiwyg-rails.svg)](https://rubygems.org/gems/wysiwyg-rails/versions/2.1.0)
|
7
|
+
|
8
|
+
>wysiwyg-rails provides the [Froala WYSIWYG HTML Editor](https://froala.com/wysiwyg-editor) javascript and stylesheets as a Rails engine for use with the asset pipeline.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this to your Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem "wysiwyg-rails"
|
16
|
+
```
|
17
|
+
|
18
|
+
and run `bundle install`.
|
19
|
+
## Usage
|
20
|
+
In your index.html.erb add
|
21
|
+
```
|
22
|
+
<script type="text/javascript" src = "../../assets/froala_editor.pkgd.min.js"></script>
|
23
|
+
```
|
24
|
+
To use third-party plugins add
|
25
|
+
```
|
26
|
+
<script type="text/javascript" src = "../../assets/third_party/font_awesome.min.js"></script>
|
27
|
+
<script type="text/javascript" src = "../../assets/third_party/embedly.min.js"></script>
|
28
|
+
<script type="text/javascript" src = "../../assets/third_party/image_tui.min.js"></script>
|
29
|
+
<script type="text/javascript" src = "../../assets/third_party/spell_checker.min.js"</script>
|
30
|
+
```
|
31
|
+
Initialize editor by adding below in body of index.html.erb
|
32
|
+
```
|
33
|
+
new FroalaEditor('#edit', {
|
34
|
+
|
35
|
+
})
|
36
|
+
```
|
37
|
+
## Options
|
38
|
+
You can pass options to editor by including these in index.html.erb
|
39
|
+
```
|
40
|
+
new FroalaEditor('#editor', {
|
41
|
+
options : value
|
42
|
+
});
|
43
|
+
```
|
44
|
+
|
45
|
+
## Include in assets
|
46
|
+
|
47
|
+
In your `application.css.scss`, include the css file:
|
48
|
+
|
49
|
+
```css
|
50
|
+
/*
|
51
|
+
@import "froala_editor.min";
|
52
|
+
@import "froala_style.min";
|
53
|
+
*/
|
54
|
+
```
|
55
|
+
|
56
|
+
If you want to use the dark theme, then you have to include `themes/dark.min.css` file too.
|
57
|
+
|
58
|
+
In your `application.js.coffee`, include the JS file:
|
59
|
+
|
60
|
+
```coffeescript
|
61
|
+
#= require froala_editor.min.js
|
62
|
+
|
63
|
+
new FroalaEditor('selector',{
|
64
|
+
|
65
|
+
});
|
66
|
+
```
|
67
|
+
|
68
|
+
If you need to use any of the [Available Plugins](https://froala.com/wysiwyg-editor/docs/plugins), then you should include those too in your `application.js.coffee` and `application.css.scss`.
|
69
|
+
|
70
|
+
```coffeescript
|
71
|
+
# Include other plugins.
|
72
|
+
#= require plugins/align.min.js
|
73
|
+
#= require plugins/char_counter.min.js
|
74
|
+
#= require plugins/code_beautifier.min.js
|
75
|
+
#= require plugins/code_view.min.js
|
76
|
+
#= require plugins/colors.min.js
|
77
|
+
#= require plugins/emoticons.min.js
|
78
|
+
#= require plugins/entities.min.js
|
79
|
+
#= require plugins/file.min.js
|
80
|
+
#= require plugins/font_family.min.js
|
81
|
+
#= require plugins/font_size.min.js
|
82
|
+
#= require plugins/fullscreen.min.js
|
83
|
+
#= require plugins/help.min.js
|
84
|
+
#= require plugins/image.min.js
|
85
|
+
#= require plugins/image_manager.min.js
|
86
|
+
#= require plugins/inline_class.min.js
|
87
|
+
#= require plugins/inline_style.min.js
|
88
|
+
#= require plugins/line_breaker.min.js
|
89
|
+
#= require plugins/line_height.min.js
|
90
|
+
#= require plugins/link.min.js
|
91
|
+
#= require plugins/lists.min.js
|
92
|
+
#= require plugins/paragraph_format.min.js
|
93
|
+
#= require plugins/paragraph_style.min.js
|
94
|
+
#= require plugins/print.min.js
|
95
|
+
#= require plugins/quick_insert.min.js
|
96
|
+
#= require plugins/quote.min.js
|
97
|
+
#= require plugins/save.min.js
|
98
|
+
#= require plugins/table.min.js
|
99
|
+
#= require plugins/special_characters.min.js
|
100
|
+
#= require plugins/url.min.js
|
101
|
+
#= require plugins/video.min.js
|
102
|
+
|
103
|
+
#= require third_party/embedly.min.js
|
104
|
+
#= require third_party/font_awesome.min.js
|
105
|
+
#= require third_party/image_tui.min.js
|
106
|
+
#= require third_party/spell_checker.min.js
|
107
|
+
```
|
108
|
+
|
109
|
+
```css
|
110
|
+
@import 'plugins/char_counter.min.css';
|
111
|
+
@import 'plugins/code_view.min.css';
|
112
|
+
@import 'plugins/colors.min.css';
|
113
|
+
@import 'plugins/emoticons.min.css';
|
114
|
+
@import 'plugins/file.min.css';
|
115
|
+
@import 'plugins/fullscreen.min.css';
|
116
|
+
@import 'plugins/help.min.css';
|
117
|
+
@import 'plugins/image_manager.min.css';
|
118
|
+
@import 'plugins/image.min.css';
|
119
|
+
@import 'plugins/line_breaker.min.css';
|
120
|
+
@import 'plugins/quick_insert.min.css';
|
121
|
+
@import 'plugins/special_characters.min.css';
|
122
|
+
@import 'plugins/table.min.css';
|
123
|
+
@import 'plugins/video.min.css';
|
124
|
+
|
125
|
+
@import 'third_party/embedly.min.css';
|
126
|
+
@import 'third_party/image_tui.min.css';
|
127
|
+
@import 'third_party/spell_checker.min.css';
|
128
|
+
```
|
129
|
+
|
130
|
+
Similar, if you want to use language translation you have to include the translation file.
|
131
|
+
|
132
|
+
```coffeescript
|
133
|
+
# Include Language if needed
|
134
|
+
#= require languages/ro.js
|
135
|
+
```
|
136
|
+
|
137
|
+
Then restart your web server if it was previously running.
|
138
|
+
|
139
|
+
## Initialize Editor
|
140
|
+
|
141
|
+
Details about initializing the editor can be found in the [Froala WYSIWYG Editor official documentation](https://www.froala.com/wysiwyg-editor/docs).
|
142
|
+
|
143
|
+
## License
|
144
|
+
|
145
|
+
The `wysiwyg-rails` project is under MIT license. However, in order to use Froala WYSIWYG HTML Editor plugin you should purchase a license for it.
|
146
|
+
|
147
|
+
Froala Editor has [3 different licenses](https://froala.com/wysiwyg-editor/pricing).
|
148
|
+
For details please see [License Agreement](https://froala.com/wysiwyg-editor/terms).
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
2
|
-
require "rake/testtask"
|
3
|
-
|
4
|
-
Rake::TestTask.new(:test)
|
5
|
-
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rake/testtask"
|
3
|
+
|
4
|
+
Rake::TestTask.new(:test)
|
5
|
+
|
6
6
|
task :default => :test
|