new_ckeditor 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +149 -0
  4. data/Rakefile +32 -0
  5. data/app/assets/config/new_ckeditor_manifest.js +6 -0
  6. data/app/assets/javascripts/new_ckeditor/balloon/ckeditor.js +6 -0
  7. data/app/assets/javascripts/new_ckeditor/balloon/translations/af.js +1 -0
  8. data/app/assets/javascripts/new_ckeditor/balloon/translations/ar.js +1 -0
  9. data/app/assets/javascripts/new_ckeditor/balloon/translations/ast.js +1 -0
  10. data/app/assets/javascripts/new_ckeditor/balloon/translations/az.js +1 -0
  11. data/app/assets/javascripts/new_ckeditor/balloon/translations/bg.js +1 -0
  12. data/app/assets/javascripts/new_ckeditor/balloon/translations/ca.js +1 -0
  13. data/app/assets/javascripts/new_ckeditor/balloon/translations/cs.js +1 -0
  14. data/app/assets/javascripts/new_ckeditor/balloon/translations/da.js +1 -0
  15. data/app/assets/javascripts/new_ckeditor/balloon/translations/de-ch.js +1 -0
  16. data/app/assets/javascripts/new_ckeditor/balloon/translations/de.js +1 -0
  17. data/app/assets/javascripts/new_ckeditor/balloon/translations/el.js +1 -0
  18. data/app/assets/javascripts/new_ckeditor/balloon/translations/en-au.js +1 -0
  19. data/app/assets/javascripts/new_ckeditor/balloon/translations/en-gb.js +1 -0
  20. data/app/assets/javascripts/new_ckeditor/balloon/translations/eo.js +1 -0
  21. data/app/assets/javascripts/new_ckeditor/balloon/translations/es.js +1 -0
  22. data/app/assets/javascripts/new_ckeditor/balloon/translations/et.js +1 -0
  23. data/app/assets/javascripts/new_ckeditor/balloon/translations/eu.js +1 -0
  24. data/app/assets/javascripts/new_ckeditor/balloon/translations/fa.js +1 -0
  25. data/app/assets/javascripts/new_ckeditor/balloon/translations/fi.js +1 -0
  26. data/app/assets/javascripts/new_ckeditor/balloon/translations/fr.js +1 -0
  27. data/app/assets/javascripts/new_ckeditor/balloon/translations/gl.js +1 -0
  28. data/app/assets/javascripts/new_ckeditor/balloon/translations/gu.js +1 -0
  29. data/app/assets/javascripts/new_ckeditor/balloon/translations/he.js +1 -0
  30. data/app/assets/javascripts/new_ckeditor/balloon/translations/hr.js +1 -0
  31. data/app/assets/javascripts/new_ckeditor/balloon/translations/hu.js +1 -0
  32. data/app/assets/javascripts/new_ckeditor/balloon/translations/id.js +1 -0
  33. data/app/assets/javascripts/new_ckeditor/balloon/translations/it.js +1 -0
  34. data/app/assets/javascripts/new_ckeditor/balloon/translations/ja.js +1 -0
  35. data/app/assets/javascripts/new_ckeditor/balloon/translations/km.js +1 -0
  36. data/app/assets/javascripts/new_ckeditor/balloon/translations/kn.js +1 -0
  37. data/app/assets/javascripts/new_ckeditor/balloon/translations/ko.js +1 -0
  38. data/app/assets/javascripts/new_ckeditor/balloon/translations/ku.js +1 -0
  39. data/app/assets/javascripts/new_ckeditor/balloon/translations/lt.js +1 -0
  40. data/app/assets/javascripts/new_ckeditor/balloon/translations/lv.js +1 -0
  41. data/app/assets/javascripts/new_ckeditor/balloon/translations/ms.js +1 -0
  42. data/app/assets/javascripts/new_ckeditor/balloon/translations/nb.js +1 -0
  43. data/app/assets/javascripts/new_ckeditor/balloon/translations/ne.js +1 -0
  44. data/app/assets/javascripts/new_ckeditor/balloon/translations/nl.js +1 -0
  45. data/app/assets/javascripts/new_ckeditor/balloon/translations/no.js +1 -0
  46. data/app/assets/javascripts/new_ckeditor/balloon/translations/oc.js +1 -0
  47. data/app/assets/javascripts/new_ckeditor/balloon/translations/pl.js +1 -0
  48. data/app/assets/javascripts/new_ckeditor/balloon/translations/pt-br.js +1 -0
  49. data/app/assets/javascripts/new_ckeditor/balloon/translations/pt.js +1 -0
  50. data/app/assets/javascripts/new_ckeditor/balloon/translations/ro.js +1 -0
  51. data/app/assets/javascripts/new_ckeditor/balloon/translations/ru.js +1 -0
  52. data/app/assets/javascripts/new_ckeditor/balloon/translations/si.js +1 -0
  53. data/app/assets/javascripts/new_ckeditor/balloon/translations/sk.js +1 -0
  54. data/app/assets/javascripts/new_ckeditor/balloon/translations/sl.js +1 -0
  55. data/app/assets/javascripts/new_ckeditor/balloon/translations/sq.js +1 -0
  56. data/app/assets/javascripts/new_ckeditor/balloon/translations/sr-latn.js +1 -0
  57. data/app/assets/javascripts/new_ckeditor/balloon/translations/sr.js +1 -0
  58. data/app/assets/javascripts/new_ckeditor/balloon/translations/sv.js +1 -0
  59. data/app/assets/javascripts/new_ckeditor/balloon/translations/tr.js +1 -0
  60. data/app/assets/javascripts/new_ckeditor/balloon/translations/tt.js +1 -0
  61. data/app/assets/javascripts/new_ckeditor/balloon/translations/ug.js +1 -0
  62. data/app/assets/javascripts/new_ckeditor/balloon/translations/uk.js +1 -0
  63. data/app/assets/javascripts/new_ckeditor/balloon/translations/vi.js +1 -0
  64. data/app/assets/javascripts/new_ckeditor/balloon/translations/zh-cn.js +1 -0
  65. data/app/assets/javascripts/new_ckeditor/balloon/translations/zh.js +1 -0
  66. data/app/assets/javascripts/new_ckeditor/classic/ckeditor.js +6 -0
  67. data/app/assets/javascripts/new_ckeditor/classic/translations/af.js +1 -0
  68. data/app/assets/javascripts/new_ckeditor/classic/translations/ar.js +1 -0
  69. data/app/assets/javascripts/new_ckeditor/classic/translations/ast.js +1 -0
  70. data/app/assets/javascripts/new_ckeditor/classic/translations/az.js +1 -0
  71. data/app/assets/javascripts/new_ckeditor/classic/translations/bg.js +1 -0
  72. data/app/assets/javascripts/new_ckeditor/classic/translations/ca.js +1 -0
  73. data/app/assets/javascripts/new_ckeditor/classic/translations/cs.js +1 -0
  74. data/app/assets/javascripts/new_ckeditor/classic/translations/da.js +1 -0
  75. data/app/assets/javascripts/new_ckeditor/classic/translations/de-ch.js +1 -0
  76. data/app/assets/javascripts/new_ckeditor/classic/translations/de.js +1 -0
  77. data/app/assets/javascripts/new_ckeditor/classic/translations/el.js +1 -0
  78. data/app/assets/javascripts/new_ckeditor/classic/translations/en-au.js +1 -0
  79. data/app/assets/javascripts/new_ckeditor/classic/translations/en-gb.js +1 -0
  80. data/app/assets/javascripts/new_ckeditor/classic/translations/eo.js +1 -0
  81. data/app/assets/javascripts/new_ckeditor/classic/translations/es.js +1 -0
  82. data/app/assets/javascripts/new_ckeditor/classic/translations/et.js +1 -0
  83. data/app/assets/javascripts/new_ckeditor/classic/translations/eu.js +1 -0
  84. data/app/assets/javascripts/new_ckeditor/classic/translations/fa.js +1 -0
  85. data/app/assets/javascripts/new_ckeditor/classic/translations/fi.js +1 -0
  86. data/app/assets/javascripts/new_ckeditor/classic/translations/fr.js +1 -0
  87. data/app/assets/javascripts/new_ckeditor/classic/translations/gl.js +1 -0
  88. data/app/assets/javascripts/new_ckeditor/classic/translations/gu.js +1 -0
  89. data/app/assets/javascripts/new_ckeditor/classic/translations/he.js +1 -0
  90. data/app/assets/javascripts/new_ckeditor/classic/translations/hr.js +1 -0
  91. data/app/assets/javascripts/new_ckeditor/classic/translations/hu.js +1 -0
  92. data/app/assets/javascripts/new_ckeditor/classic/translations/id.js +1 -0
  93. data/app/assets/javascripts/new_ckeditor/classic/translations/it.js +1 -0
  94. data/app/assets/javascripts/new_ckeditor/classic/translations/ja.js +1 -0
  95. data/app/assets/javascripts/new_ckeditor/classic/translations/km.js +1 -0
  96. data/app/assets/javascripts/new_ckeditor/classic/translations/kn.js +1 -0
  97. data/app/assets/javascripts/new_ckeditor/classic/translations/ko.js +1 -0
  98. data/app/assets/javascripts/new_ckeditor/classic/translations/ku.js +1 -0
  99. data/app/assets/javascripts/new_ckeditor/classic/translations/lt.js +1 -0
  100. data/app/assets/javascripts/new_ckeditor/classic/translations/lv.js +1 -0
  101. data/app/assets/javascripts/new_ckeditor/classic/translations/ms.js +1 -0
  102. data/app/assets/javascripts/new_ckeditor/classic/translations/nb.js +1 -0
  103. data/app/assets/javascripts/new_ckeditor/classic/translations/ne.js +1 -0
  104. data/app/assets/javascripts/new_ckeditor/classic/translations/nl.js +1 -0
  105. data/app/assets/javascripts/new_ckeditor/classic/translations/no.js +1 -0
  106. data/app/assets/javascripts/new_ckeditor/classic/translations/oc.js +1 -0
  107. data/app/assets/javascripts/new_ckeditor/classic/translations/pl.js +1 -0
  108. data/app/assets/javascripts/new_ckeditor/classic/translations/pt-br.js +1 -0
  109. data/app/assets/javascripts/new_ckeditor/classic/translations/pt.js +1 -0
  110. data/app/assets/javascripts/new_ckeditor/classic/translations/ro.js +1 -0
  111. data/app/assets/javascripts/new_ckeditor/classic/translations/ru.js +1 -0
  112. data/app/assets/javascripts/new_ckeditor/classic/translations/si.js +1 -0
  113. data/app/assets/javascripts/new_ckeditor/classic/translations/sk.js +1 -0
  114. data/app/assets/javascripts/new_ckeditor/classic/translations/sl.js +1 -0
  115. data/app/assets/javascripts/new_ckeditor/classic/translations/sq.js +1 -0
  116. data/app/assets/javascripts/new_ckeditor/classic/translations/sr-latn.js +1 -0
  117. data/app/assets/javascripts/new_ckeditor/classic/translations/sr.js +1 -0
  118. data/app/assets/javascripts/new_ckeditor/classic/translations/sv.js +1 -0
  119. data/app/assets/javascripts/new_ckeditor/classic/translations/tr.js +1 -0
  120. data/app/assets/javascripts/new_ckeditor/classic/translations/tt.js +1 -0
  121. data/app/assets/javascripts/new_ckeditor/classic/translations/ug.js +1 -0
  122. data/app/assets/javascripts/new_ckeditor/classic/translations/uk.js +1 -0
  123. data/app/assets/javascripts/new_ckeditor/classic/translations/vi.js +1 -0
  124. data/app/assets/javascripts/new_ckeditor/classic/translations/zh-cn.js +1 -0
  125. data/app/assets/javascripts/new_ckeditor/classic/translations/zh.js +1 -0
  126. data/app/assets/javascripts/new_ckeditor/inline/ckeditor.js +6 -0
  127. data/app/assets/javascripts/new_ckeditor/inline/translations/af.js +1 -0
  128. data/app/assets/javascripts/new_ckeditor/inline/translations/ar.js +1 -0
  129. data/app/assets/javascripts/new_ckeditor/inline/translations/ast.js +1 -0
  130. data/app/assets/javascripts/new_ckeditor/inline/translations/az.js +1 -0
  131. data/app/assets/javascripts/new_ckeditor/inline/translations/bg.js +1 -0
  132. data/app/assets/javascripts/new_ckeditor/inline/translations/ca.js +1 -0
  133. data/app/assets/javascripts/new_ckeditor/inline/translations/cs.js +1 -0
  134. data/app/assets/javascripts/new_ckeditor/inline/translations/da.js +1 -0
  135. data/app/assets/javascripts/new_ckeditor/inline/translations/de-ch.js +1 -0
  136. data/app/assets/javascripts/new_ckeditor/inline/translations/de.js +1 -0
  137. data/app/assets/javascripts/new_ckeditor/inline/translations/el.js +1 -0
  138. data/app/assets/javascripts/new_ckeditor/inline/translations/en-au.js +1 -0
  139. data/app/assets/javascripts/new_ckeditor/inline/translations/en-gb.js +1 -0
  140. data/app/assets/javascripts/new_ckeditor/inline/translations/eo.js +1 -0
  141. data/app/assets/javascripts/new_ckeditor/inline/translations/es.js +1 -0
  142. data/app/assets/javascripts/new_ckeditor/inline/translations/et.js +1 -0
  143. data/app/assets/javascripts/new_ckeditor/inline/translations/eu.js +1 -0
  144. data/app/assets/javascripts/new_ckeditor/inline/translations/fa.js +1 -0
  145. data/app/assets/javascripts/new_ckeditor/inline/translations/fi.js +1 -0
  146. data/app/assets/javascripts/new_ckeditor/inline/translations/fr.js +1 -0
  147. data/app/assets/javascripts/new_ckeditor/inline/translations/gl.js +1 -0
  148. data/app/assets/javascripts/new_ckeditor/inline/translations/gu.js +1 -0
  149. data/app/assets/javascripts/new_ckeditor/inline/translations/he.js +1 -0
  150. data/app/assets/javascripts/new_ckeditor/inline/translations/hr.js +1 -0
  151. data/app/assets/javascripts/new_ckeditor/inline/translations/hu.js +1 -0
  152. data/app/assets/javascripts/new_ckeditor/inline/translations/id.js +1 -0
  153. data/app/assets/javascripts/new_ckeditor/inline/translations/it.js +1 -0
  154. data/app/assets/javascripts/new_ckeditor/inline/translations/ja.js +1 -0
  155. data/app/assets/javascripts/new_ckeditor/inline/translations/km.js +1 -0
  156. data/app/assets/javascripts/new_ckeditor/inline/translations/kn.js +1 -0
  157. data/app/assets/javascripts/new_ckeditor/inline/translations/ko.js +1 -0
  158. data/app/assets/javascripts/new_ckeditor/inline/translations/ku.js +1 -0
  159. data/app/assets/javascripts/new_ckeditor/inline/translations/lt.js +1 -0
  160. data/app/assets/javascripts/new_ckeditor/inline/translations/lv.js +1 -0
  161. data/app/assets/javascripts/new_ckeditor/inline/translations/ms.js +1 -0
  162. data/app/assets/javascripts/new_ckeditor/inline/translations/nb.js +1 -0
  163. data/app/assets/javascripts/new_ckeditor/inline/translations/ne.js +1 -0
  164. data/app/assets/javascripts/new_ckeditor/inline/translations/nl.js +1 -0
  165. data/app/assets/javascripts/new_ckeditor/inline/translations/no.js +1 -0
  166. data/app/assets/javascripts/new_ckeditor/inline/translations/oc.js +1 -0
  167. data/app/assets/javascripts/new_ckeditor/inline/translations/pl.js +1 -0
  168. data/app/assets/javascripts/new_ckeditor/inline/translations/pt-br.js +1 -0
  169. data/app/assets/javascripts/new_ckeditor/inline/translations/pt.js +1 -0
  170. data/app/assets/javascripts/new_ckeditor/inline/translations/ro.js +1 -0
  171. data/app/assets/javascripts/new_ckeditor/inline/translations/ru.js +1 -0
  172. data/app/assets/javascripts/new_ckeditor/inline/translations/si.js +1 -0
  173. data/app/assets/javascripts/new_ckeditor/inline/translations/sk.js +1 -0
  174. data/app/assets/javascripts/new_ckeditor/inline/translations/sl.js +1 -0
  175. data/app/assets/javascripts/new_ckeditor/inline/translations/sq.js +1 -0
  176. data/app/assets/javascripts/new_ckeditor/inline/translations/sr-latn.js +1 -0
  177. data/app/assets/javascripts/new_ckeditor/inline/translations/sr.js +1 -0
  178. data/app/assets/javascripts/new_ckeditor/inline/translations/sv.js +1 -0
  179. data/app/assets/javascripts/new_ckeditor/inline/translations/tr.js +1 -0
  180. data/app/assets/javascripts/new_ckeditor/inline/translations/tt.js +1 -0
  181. data/app/assets/javascripts/new_ckeditor/inline/translations/ug.js +1 -0
  182. data/app/assets/javascripts/new_ckeditor/inline/translations/uk.js +1 -0
  183. data/app/assets/javascripts/new_ckeditor/inline/translations/vi.js +1 -0
  184. data/app/assets/javascripts/new_ckeditor/inline/translations/zh-cn.js +1 -0
  185. data/app/assets/javascripts/new_ckeditor/inline/translations/zh.js +1 -0
  186. data/app/assets/stylesheets/new_ckeditor/ckeditor.css +300 -0
  187. data/app/views/new_ckeditor/shared/_balloon.html.erb +79 -0
  188. data/app/views/new_ckeditor/shared/_classic.html.erb +58 -0
  189. data/app/views/new_ckeditor/shared/_inline.html.erb +65 -0
  190. data/config/routes.rb +2 -0
  191. data/lib/generators/new_ckeditor_generator.rb +10 -0
  192. data/lib/new_ckeditor/addons/simple_form.rb +16 -0
  193. data/lib/new_ckeditor/editor.rb +65 -0
  194. data/lib/new_ckeditor/engine.rb +24 -0
  195. data/lib/new_ckeditor/rails_ext/form_builder.rb +11 -0
  196. data/lib/new_ckeditor/rails_ext/form_helper.rb +11 -0
  197. data/lib/new_ckeditor/rails_ext/view_helper.rb +12 -0
  198. data/lib/new_ckeditor/version.rb +3 -0
  199. data/lib/new_ckeditor.rb +15 -0
  200. data/lib/tasks/new_ckeditor_tasks.rake +4 -0
  201. metadata +326 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0eefeeb12aad3cb29959f2cefb57379afd52a6928bff017b806386868e565a84
4
+ data.tar.gz: 3cd4044f33ebe962f8dedd6a9397ccfefbdff42fe2b657763658bfc5979e9eb1
5
+ SHA512:
6
+ metadata.gz: 38a80c133ec4f995a44b200240f5411cf6acae391defba6dbafaff4afbb16100a685471f135ec769b42bf636c9de847107ec84b30b0577ff832c617ae5366c1e
7
+ data.tar.gz: 686028c8fe5e689e9146fd5d1a7ca2612fc9bbff04232bd2d222b791013248be0bb426fef5fc9a64baaca353caaca4ae3cf9df99f1f8e2bf052b8efa9a12aa0c
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2020 Igor Kasyanchuk
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,149 @@
1
+ # Rails + CKEditor 5
2
+
3
+ Short description and motivation.
4
+
5
+ ## Usage
6
+
7
+ How to use my plugin.
8
+
9
+ ## Installation
10
+
11
+ Add this line to your application's Gemfile and run `bundle`:
12
+
13
+ ```ruby
14
+ gem 'new_ckeditor'
15
+ ```
16
+
17
+ ## Configuration
18
+
19
+ ## File Upload with CKEditor 5
20
+
21
+ Gem doesn't have any strict dependency on any library. It's implemented this way on purpose to let developer use gem which he wants. Maybe in the future we can improve it.
22
+
23
+ But you can get a base skeleton where you can put your own logic.
24
+
25
+ Below I'll put an example of code which works with CKEditor.
26
+
27
+ 1. Let's start with new controller `rails g controller file_uploads upload`
28
+
29
+ ```ruby
30
+ class FileUploadsController < ApplicationController
31
+ # note
32
+ # that method must return json with URL to an uploaded image
33
+ # or error message
34
+ def upload
35
+ image = CkEditorImage.new(file: params["upload"])
36
+ if image.save
37
+ render json: {
38
+ url: image.file.url
39
+ }
40
+ else
41
+ render json: {
42
+ "error": {
43
+ "message": image.errors.full_messages.join(", ")
44
+ }
45
+ }
46
+ end
47
+ end
48
+ end
49
+ ```
50
+
51
+ 2. Create a new model where images will be stored: `rails g model CkEditorImage file:string user_id:integer parent_id:integer parent_type:string`
52
+
53
+ ```ruby
54
+ class CkEditorImage < ApplicationRecord
55
+ mount_uploader :file, CkEditorImageUploader
56
+ belongs_to :user, optional: true
57
+ validates_presence_of :file
58
+ end
59
+ ```
60
+
61
+ Code of migration may look like:
62
+
63
+ ```ruby
64
+ class CreateCkEditorImages < ActiveRecord::Migration[6.0]
65
+ def change
66
+ create_table :ck_editor_images do |t|
67
+ t.string :file
68
+ t.integer :user_id, index: true
69
+ t.integer :parent_id
70
+ t.string :parent_type
71
+
72
+ t.datetime :created_at
73
+ t.datetime :updated_at
74
+ end
75
+ add_index :ck_editor_images, :user_id
76
+ add_index :ck_editor_images, [:parent_id, :parent_type]
77
+ end
78
+ end
79
+ ```
80
+
81
+ Run this migration.
82
+
83
+ 3. Create Carrierwave uploader `rails g uploader CkEditorImage`. Open and edit it if needed.
84
+
85
+ 4. Open again controller, edit logic, check user, check params, etc. You have a full control how to implement logic of storing files.
86
+
87
+ ## Output
88
+
89
+ ### Output RAW HTML from CKEditor
90
+
91
+ To use same CSS as in editor, to keep consistent UI:
92
+
93
+ Require CSS file in `application.css`:
94
+
95
+ ```css
96
+ *= require new_ckeditor/ckeditor.css
97
+ ```
98
+
99
+ And in the view wrap output in `.ck-content` class:
100
+
101
+ ```erb
102
+ <p>
103
+ <strong>About:</strong>
104
+ <div class="ck-content">
105
+ <%= raw @user.about %>
106
+ </div>
107
+ </p>
108
+ ```
109
+
110
+ More documentation: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/content-styles.html
111
+
112
+ ## Styling
113
+
114
+ ### CKEditor 5 set min-height, height, width
115
+
116
+ ```css
117
+ .ck-editor__editable {
118
+ min-height: 500px;
119
+ }
120
+ ```
121
+
122
+ You can editor in some parent div and set height explicitly for editor inside.
123
+
124
+ ## TODO
125
+
126
+ - different types of ckeditors
127
+ - generator for toolbar
128
+ - configuration to specify toolbar
129
+ - generator for controller?
130
+ - store files using active storage
131
+ - store with user_id, and parent?
132
+ - readme, samples
133
+ - gif with demo
134
+ - sample with ajax? and with ballon?
135
+ - tests
136
+ - CSFR-Token
137
+ - support inline editor?
138
+ - remove title plugin
139
+ - check how it works with turbolinks
140
+
141
+ ## Customization
142
+
143
+ https://ckeditor.com/ckeditor-5/online-builder/
144
+
145
+ ## Contributing
146
+ Contribution directions go here.
147
+
148
+ ## License
149
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,32 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'NewCkeditor'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
18
+ load 'rails/tasks/engine.rake'
19
+
20
+ load 'rails/tasks/statistics.rake'
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'test'
28
+ t.pattern = 'test/**/*_test.rb'
29
+ t.verbose = false
30
+ end
31
+
32
+ task default: :test
@@ -0,0 +1,6 @@
1
+ //= link_tree ../images
2
+ //= link_tree ../images/new_ckeditor
3
+ //= link_directory ../images
4
+ //= link_directory ../images/new_ckeditor
5
+ //= link_directory ../javascripts .js
6
+ //= link_directory ../stylesheets .css