wysiwyg-rails 1.2.7 → 4.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (194) hide show
  1. checksums.yaml +5 -5
  2. data/LICENSE +1 -1
  3. data/README.md +112 -35
  4. data/app/assets/javascripts/froala_editor.min.js +5 -9
  5. data/app/assets/javascripts/froala_editor.pkgd.min.js +7 -0
  6. data/app/assets/javascripts/languages/ar.js +291 -0
  7. data/app/assets/javascripts/languages/bs.js +278 -0
  8. data/app/assets/javascripts/languages/cs.js +284 -0
  9. data/app/assets/javascripts/languages/da.js +276 -0
  10. data/app/assets/javascripts/languages/de.js +309 -0
  11. data/app/assets/javascripts/languages/el.js +284 -0
  12. data/app/assets/javascripts/languages/en_ca.js +222 -0
  13. data/app/assets/javascripts/languages/en_gb.js +222 -0
  14. data/app/assets/javascripts/languages/es.js +289 -0
  15. data/app/assets/javascripts/languages/et.js +278 -0
  16. data/app/assets/javascripts/languages/fa.js +278 -0
  17. data/app/assets/javascripts/languages/fi.js +278 -0
  18. data/app/assets/javascripts/languages/fr.js +303 -0
  19. data/app/assets/javascripts/languages/he.js +278 -0
  20. data/app/assets/javascripts/languages/hr.js +278 -0
  21. data/app/assets/javascripts/languages/hu.js +284 -0
  22. data/app/assets/javascripts/languages/id.js +278 -0
  23. data/app/assets/javascripts/languages/it.js +294 -0
  24. data/app/assets/javascripts/languages/ja.js +278 -0
  25. data/app/assets/javascripts/languages/ko.js +306 -0
  26. data/app/assets/javascripts/languages/ku.js +271 -0
  27. data/app/assets/javascripts/languages/me.js +278 -0
  28. data/app/assets/javascripts/languages/nb.js +278 -0
  29. data/app/assets/javascripts/languages/nl.js +291 -0
  30. data/app/assets/javascripts/languages/pl.js +295 -0
  31. data/app/assets/javascripts/languages/pt_br.js +278 -0
  32. data/app/assets/javascripts/languages/pt_pt.js +295 -0
  33. data/app/assets/javascripts/languages/ro.js +278 -0
  34. data/app/assets/javascripts/languages/ru.js +291 -0
  35. data/app/assets/javascripts/languages/sk.js +284 -0
  36. data/app/assets/javascripts/languages/sl.js +224 -0
  37. data/app/assets/javascripts/languages/sr.js +278 -0
  38. data/app/assets/javascripts/languages/sv.js +278 -0
  39. data/app/assets/javascripts/languages/th.js +278 -0
  40. data/app/assets/javascripts/languages/tr.js +278 -0
  41. data/app/assets/javascripts/languages/uk.js +278 -0
  42. data/app/assets/javascripts/languages/vi.js +219 -0
  43. data/app/assets/javascripts/languages/zh_cn.js +304 -0
  44. data/app/assets/javascripts/languages/zh_tw.js +278 -0
  45. data/app/assets/javascripts/plugins/align.min.js +7 -0
  46. data/app/assets/javascripts/plugins/char_counter.min.js +5 -4
  47. data/app/assets/javascripts/plugins/code_beautifier.min.js +7 -0
  48. data/app/assets/javascripts/plugins/code_view.min.js +7 -0
  49. data/app/assets/javascripts/plugins/colors.min.js +5 -4
  50. data/app/assets/javascripts/plugins/cryptojs.min.js +7 -0
  51. data/app/assets/javascripts/plugins/draggable.min.js +7 -0
  52. data/app/assets/javascripts/plugins/edit_in_popup.min.js +7 -0
  53. data/app/assets/javascripts/plugins/emoticons.min.js +7 -0
  54. data/app/assets/javascripts/plugins/entities.min.js +5 -4
  55. data/app/assets/javascripts/plugins/file.min.js +7 -0
  56. data/app/assets/javascripts/plugins/files_manager.min.js +7 -0
  57. data/app/assets/javascripts/plugins/font_family.min.js +5 -4
  58. data/app/assets/javascripts/plugins/font_size.min.js +5 -4
  59. data/app/assets/javascripts/plugins/forms.min.js +7 -0
  60. data/app/assets/javascripts/plugins/fullscreen.min.js +5 -4
  61. data/app/assets/javascripts/plugins/help.min.js +7 -0
  62. data/app/assets/javascripts/plugins/image.min.js +7 -0
  63. data/app/assets/javascripts/plugins/image_manager.min.js +7 -0
  64. data/app/assets/javascripts/plugins/inline_class.min.js +7 -0
  65. data/app/assets/javascripts/plugins/inline_style.min.js +7 -0
  66. data/app/assets/javascripts/plugins/line_breaker.min.js +7 -0
  67. data/app/assets/javascripts/plugins/line_height.min.js +7 -0
  68. data/app/assets/javascripts/plugins/link.min.js +7 -0
  69. data/app/assets/javascripts/plugins/lists.min.js +5 -4
  70. data/app/assets/javascripts/plugins/markdown.min.js +7 -0
  71. data/app/assets/javascripts/plugins/paragraph_format.min.js +7 -0
  72. data/app/assets/javascripts/plugins/paragraph_style.min.js +7 -0
  73. data/app/assets/javascripts/plugins/print.min.js +7 -0
  74. data/app/assets/javascripts/plugins/quick_insert.min.js +7 -0
  75. data/app/assets/javascripts/plugins/quote.min.js +7 -0
  76. data/app/assets/javascripts/plugins/save.min.js +7 -0
  77. data/app/assets/javascripts/plugins/special_characters.min.js +7 -0
  78. data/app/assets/javascripts/plugins/table.min.js +7 -0
  79. data/app/assets/javascripts/plugins/track_changes.min.js +7 -0
  80. data/app/assets/javascripts/plugins/trim_video.min.js +7 -0
  81. data/app/assets/javascripts/plugins/url.min.js +7 -0
  82. data/app/assets/javascripts/plugins/video.min.js +5 -4
  83. data/app/assets/javascripts/plugins/word_paste.min.js +7 -0
  84. data/app/assets/javascripts/plugins.pkgd.min.js +7 -0
  85. data/app/assets/javascripts/third_party/embedly.min.js +7 -0
  86. data/app/assets/javascripts/third_party/font_awesome.min.js +7 -0
  87. data/app/assets/javascripts/third_party/image_tui.min.js +7 -0
  88. data/app/assets/javascripts/third_party/showdown.min.js +7 -0
  89. data/app/assets/javascripts/third_party/spell_checker.min.js +7 -0
  90. data/app/assets/stylesheets/froala_editor.css +1431 -0
  91. data/app/assets/stylesheets/froala_editor.min.css +6 -4
  92. data/app/assets/stylesheets/froala_editor.pkgd.css +4808 -0
  93. data/app/assets/stylesheets/froala_editor.pkgd.min.css +7 -0
  94. data/app/assets/stylesheets/froala_style.css +362 -0
  95. data/app/assets/stylesheets/froala_style.min.css +6 -4
  96. data/app/assets/stylesheets/plugins/char_counter.css +49 -0
  97. data/app/assets/stylesheets/plugins/char_counter.min.css +7 -0
  98. data/app/assets/stylesheets/plugins/code_view.css +97 -0
  99. data/app/assets/stylesheets/plugins/code_view.min.css +7 -0
  100. data/app/assets/stylesheets/plugins/colors.css +98 -0
  101. data/app/assets/stylesheets/plugins/colors.min.css +7 -0
  102. data/app/assets/stylesheets/plugins/draggable.css +41 -0
  103. data/app/assets/stylesheets/plugins/draggable.min.css +7 -0
  104. data/app/assets/stylesheets/plugins/emoticons.css +34 -0
  105. data/app/assets/stylesheets/plugins/emoticons.min.css +7 -0
  106. data/app/assets/stylesheets/plugins/file.css +128 -0
  107. data/app/assets/stylesheets/plugins/file.min.css +7 -0
  108. data/app/assets/stylesheets/plugins/files_manager.css +1240 -0
  109. data/app/assets/stylesheets/plugins/files_manager.min.css +7 -0
  110. data/app/assets/stylesheets/plugins/fullscreen.css +79 -0
  111. data/app/assets/stylesheets/plugins/fullscreen.min.css +7 -0
  112. data/app/assets/stylesheets/plugins/help.css +45 -0
  113. data/app/assets/stylesheets/plugins/help.min.css +7 -0
  114. data/app/assets/stylesheets/plugins/image.css +213 -0
  115. data/app/assets/stylesheets/plugins/image.min.css +7 -0
  116. data/app/assets/stylesheets/plugins/image_manager.css +236 -0
  117. data/app/assets/stylesheets/plugins/image_manager.min.css +7 -0
  118. data/app/assets/stylesheets/plugins/line_breaker.css +38 -0
  119. data/app/assets/stylesheets/plugins/line_breaker.min.css +7 -0
  120. data/app/assets/stylesheets/plugins/markdown.css +149 -0
  121. data/app/assets/stylesheets/plugins/markdown.min.css +7 -0
  122. data/app/assets/stylesheets/plugins/quick_insert.css +72 -0
  123. data/app/assets/stylesheets/plugins/quick_insert.min.css +7 -0
  124. data/app/assets/stylesheets/plugins/special_characters.css +33 -0
  125. data/app/assets/stylesheets/plugins/special_characters.min.css +7 -0
  126. data/app/assets/stylesheets/plugins/table.css +111 -0
  127. data/app/assets/stylesheets/plugins/table.min.css +7 -0
  128. data/app/assets/stylesheets/plugins/trim_video.css +247 -0
  129. data/app/assets/stylesheets/plugins/trim_video.min.css +7 -0
  130. data/app/assets/stylesheets/plugins/video.css +201 -0
  131. data/app/assets/stylesheets/plugins/video.min.css +7 -0
  132. data/app/assets/stylesheets/plugins.pkgd.css +3025 -0
  133. data/app/assets/stylesheets/plugins.pkgd.min.css +7 -0
  134. data/app/assets/stylesheets/themes/dark.css +2188 -0
  135. data/app/assets/stylesheets/themes/dark.min.css +6 -4
  136. data/app/assets/stylesheets/themes/gray.css +2188 -0
  137. data/app/assets/stylesheets/themes/gray.min.css +6 -4
  138. data/app/assets/stylesheets/themes/royal.css +2188 -0
  139. data/app/assets/stylesheets/themes/royal.min.css +6 -4
  140. data/app/assets/stylesheets/third_party/embedly.css +60 -0
  141. data/app/assets/stylesheets/third_party/embedly.min.css +7 -0
  142. data/app/assets/stylesheets/third_party/font_awesome.css +33 -0
  143. data/app/assets/stylesheets/third_party/font_awesome.min.css +7 -0
  144. data/app/assets/stylesheets/third_party/image_tui.css +41 -0
  145. data/app/assets/stylesheets/third_party/image_tui.min.css +7 -0
  146. data/app/assets/stylesheets/third_party/spell_checker.css +64 -0
  147. data/app/assets/stylesheets/third_party/spell_checker.min.css +7 -0
  148. data/lib/wysiwyg-rails/engine.rb +11 -0
  149. data/lib/wysiwyg-rails/version.rb +1 -1
  150. metadata +142 -72
  151. data/app/assets/javascripts/froala_editor_ie8.min.js +0 -6
  152. data/app/assets/javascripts/langs/ar.js +0 -94
  153. data/app/assets/javascripts/langs/bs.js +0 -94
  154. data/app/assets/javascripts/langs/cs.js +0 -94
  155. data/app/assets/javascripts/langs/da.js +0 -94
  156. data/app/assets/javascripts/langs/de.js +0 -94
  157. data/app/assets/javascripts/langs/en_ca.js +0 -94
  158. data/app/assets/javascripts/langs/en_gb.js +0 -94
  159. data/app/assets/javascripts/langs/en_us.js +0 -94
  160. data/app/assets/javascripts/langs/es.js +0 -94
  161. data/app/assets/javascripts/langs/et.js +0 -90
  162. data/app/assets/javascripts/langs/fa.js +0 -94
  163. data/app/assets/javascripts/langs/fi.js +0 -94
  164. data/app/assets/javascripts/langs/fr.js +0 -94
  165. data/app/assets/javascripts/langs/he.js +0 -94
  166. data/app/assets/javascripts/langs/hr.js +0 -94
  167. data/app/assets/javascripts/langs/hu.js +0 -94
  168. data/app/assets/javascripts/langs/id.js +0 -94
  169. data/app/assets/javascripts/langs/it.js +0 -94
  170. data/app/assets/javascripts/langs/ja.js +0 -94
  171. data/app/assets/javascripts/langs/ko.js +0 -94
  172. data/app/assets/javascripts/langs/me.js +0 -94
  173. data/app/assets/javascripts/langs/nb.js +0 -94
  174. data/app/assets/javascripts/langs/nl.js +0 -94
  175. data/app/assets/javascripts/langs/pl.js +0 -94
  176. data/app/assets/javascripts/langs/pt_br.js +0 -94
  177. data/app/assets/javascripts/langs/pt_pt.js +0 -94
  178. data/app/assets/javascripts/langs/ro.js +0 -94
  179. data/app/assets/javascripts/langs/ru.js +0 -94
  180. data/app/assets/javascripts/langs/sr.js +0 -94
  181. data/app/assets/javascripts/langs/sv.js +0 -94
  182. data/app/assets/javascripts/langs/th.js +0 -94
  183. data/app/assets/javascripts/langs/tr.js +0 -94
  184. data/app/assets/javascripts/langs/uk.js +0 -94
  185. data/app/assets/javascripts/langs/zh_cn.js +0 -94
  186. data/app/assets/javascripts/langs/zh_tw.js +0 -94
  187. data/app/assets/javascripts/plugins/block_styles.min.js +0 -6
  188. data/app/assets/javascripts/plugins/file_upload.min.js +0 -6
  189. data/app/assets/javascripts/plugins/inline_styles.min.js +0 -6
  190. data/app/assets/javascripts/plugins/media_manager.min.js +0 -6
  191. data/app/assets/javascripts/plugins/tables.min.js +0 -6
  192. data/app/assets/javascripts/plugins/urls.min.js +0 -6
  193. data/app/assets/stylesheets/froala_content.min.css +0 -5
  194. data/app/assets/stylesheets/themes/red.min.css +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 112144032bba9b2db59b9c369370d2259261c64d
4
- data.tar.gz: 5563ea92760e5b7c7c73d5b6e5ea6c3908fc3aa5
2
+ SHA256:
3
+ metadata.gz: e411f932346d0c724fe55cb53007295485f8cefde525cc6daa65d7d18bde3459
4
+ data.tar.gz: 585022fa57b1780de68c229eabc327d20bc64d2ad6e4d1bdfb0018671ebcffa2
5
5
  SHA512:
6
- metadata.gz: 61191023384353380b9e01155dfe6d2c709b4280232d88b5e7999963bc77bee8e906ee5f21a2aafa9d0c42a8532af2749d7d36c139c7f7a379956612a3ff78eb
7
- data.tar.gz: 20fe30ad653d901e51b8da3e5d31709a4cafb289ce852ff81967504262b5e7719ae6387fa53fbe8f42e201d1b171d5d61c8eff74c17e8a1134bc9e70d16a0ac8
6
+ metadata.gz: 05504d424f2152c9f8b63c210915e78e851d7eb829f351ab60d3ecdab83fc871c37bb690924c58e76bbc8c692650cc7e97f27db88d98eac96ee8cf07c35dac71
7
+ data.tar.gz: b1e6b2dc29bd1aeadca06970e126db25744eb05c6ab056bc81b1b09b2ca27ac3ecdd270f9e0c73d1e9b58f32e46a506e087b95cd0104361b9ee135963558f9d1
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Froala
1
+ Copyright (c) 2015 Froala
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,6 +1,11 @@
1
- # wysiwyg-rails [![Gem Version](https://badge.fury.io/rb/wysiwyg-rails.png)](http://badge.fury.io/rb/wysiwyg-rails) [![Build Status](https://secure.travis-ci.org/froala/wysiwyg-rails.png)](http://travis-ci.org/froala/wysiwyg-rails)
1
+ # Rails Froala WYSIWYG HTML Editor
2
2
 
3
- 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.
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.
4
9
 
5
10
  ## Installation
6
11
 
@@ -11,61 +16,133 @@ gem "wysiwyg-rails"
11
16
  ```
12
17
 
13
18
  and run `bundle install`.
14
-
15
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
16
46
 
17
- In your `application.css`, include the css file:
47
+ In your `application.css.scss`, include the css file:
18
48
 
19
49
  ```css
20
50
  /*
21
- *= require froala_editor.min.css
22
- *= require froala_style.min.css
23
- *= require font-awesome
51
+ @import "froala_editor.min";
52
+ @import "froala_style.min";
24
53
  */
25
54
  ```
26
55
 
27
56
  If you want to use the dark theme, then you have to include `themes/dark.min.css` file too.
28
57
 
29
- In your `application.js`, include the JS file:
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
+ ```
30
67
 
31
- ```javascript
32
- //
33
- //= require froala_editor.min.js
34
- //
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
35
107
  ```
36
108
 
37
- 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`.
38
- ```javascript
39
- // Include other plugins.
40
- //= require plugins/block_styles.min.js
41
- //= require plugins/colors.min.js
42
- //= require plugins/media_manager.min.js
43
- //= require plugins/tables.min.js
44
- //= require plugins/video.min.js
45
- //= require plugins/font_family.min.js
46
- //= require plugins/font_size.min.js
47
- //= require plugins/file_upload.min.js
48
- //= require plugins/lists.min.js
49
- //= require plugins/char_counter.min.js
50
- //= require plugins/fullscreen.min.js
51
- //= require plugins/urls.min.js
52
- //= require plugins/inline_styles.min.js
53
- //= require plugins/entities.min.js
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';
54
128
  ```
55
129
 
56
130
  Similar, if you want to use language translation you have to include the translation file.
57
- ```javascript
58
- // Include Language if needed
59
- //= require langs/ro.js
131
+
132
+ ```coffeescript
133
+ # Include Language if needed
134
+ #= require languages/ro.js
60
135
  ```
61
136
 
62
137
  Then restart your web server if it was previously running.
63
138
 
64
- Congrats all is done!
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).
65
142
 
66
143
  ## License
67
144
 
68
- The `wysiwyg-rails` project is under MIT license.
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.
69
146
 
70
- Froala Editor has [4 different licenses](https://froala.com/wysiwyg-editor/pricing) for commercial use.
147
+ Froala Editor has [3 different licenses](https://froala.com/wysiwyg-editor/pricing).
71
148
  For details please see [License Agreement](https://froala.com/wysiwyg-editor/terms).