summernote-rails 0.8.8.0 → 0.8.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3789f783ee9e292b2f92db8804c4df36dfb18c5f65996d66c87c072cae523f0d
4
- data.tar.gz: b922d3090679f84f27e0157bcb7d10fd9044e9efb970ac8adee2390d54d4ae6c
3
+ metadata.gz: e667a23ac21399847dbbf888e556a41b649ba368adba475418c76a8072af44b7
4
+ data.tar.gz: bfdabd00e9fee967f8763c2477952959c1a57c773e55b7d779adda4a5c949fc6
5
5
  SHA512:
6
- metadata.gz: 04bc65a7dee2d259ab56628480569f7202f340fd66af66e38203be47c99e62244217d82c720f632ed3ac58fefcfc092cec259062d62d5b734ea4faee02325175
7
- data.tar.gz: f2e087231356e7b08ae2c120a38d7e346416707650c0f38d3d9a9f6b4ee52435c980016ace175d1d2457bc5e471db277538758236f6b177df6f28202c8124610
6
+ metadata.gz: b5f3efe3a842a0b1a7c6d0fb1e141152965cd15936a4266ee8508152f05dd7e7031164cbc9a885fb7ac0007233658e7493fe7e6738312e5404787a8811d55340
7
+ data.tar.gz: c1f4bb4d06928fb60bea1c4900cc3df10ad6d20e14b31e862107655026105cc5b5a24ee74a895b3ab037996ebadd63f6439edc29adffc322e1eb0fc27a65b435
data/README.md CHANGED
@@ -2,19 +2,27 @@
2
2
 
3
3
  This gem was built to package the assets used in Summernote, the Super Simple WYSIWYG Editor on Bootstrap, for Ruby on Rails version >= 3.1.
4
4
 
5
- https://github.com/summernote/summernote-rails.
6
-
7
- The version of summernote-rails is matched with that of summernote editor.
5
+ The version of summernote-rails is matched with that of original summernote editor.
8
6
 
9
7
  [![Gem Version](https://badge.fury.io/rb/summernote-rails.png)](http://badge.fury.io/rb/summernote-rails)
10
8
 
11
9
  ## Installation
12
10
 
11
+ Environments:
12
+ - Ruby v2.5.0
13
+ - Rails v5.2.0.beta2
14
+ - Gems :
15
+ - bootstrap v4.0.0
16
+ - simple_form v3.5.0
17
+
13
18
  Add the following gems to your application's Gemfile:
14
19
 
15
20
  ```ruby
16
- gem 'summernote-rails', 'current version number'
17
- gem 'bootstrap-sass' # required
21
+ gem 'rails', '~> 5.2.0.beta2'
22
+ gem 'jquery-rails', '~> 4.3.1'
23
+ gem 'bootstrap', '~> 4.0.0'
24
+ gem 'summernote-rails', '~> 0.8.8.1'
25
+ gem 'simple_form', '~> 3.5.0'
18
26
  ```
19
27
 
20
28
  And then execute:
@@ -27,56 +35,38 @@ $ bundle install
27
35
 
28
36
  In app/assets/stylesheets/application.scss,
29
37
 
30
- ```css
38
+ ```scss
31
39
  @import "bootstrap";
32
- @import "summernote";
40
+ @import "summernote-bs4";
41
+ @import "summernote-custom-theme.min";
33
42
  ```
34
43
 
35
44
  In app/assets/javascripts/application.js, you should add as follows:
36
45
 
37
46
  ```js
38
- //= require ...
47
+ //= require jquery
48
+ //= require jquery_ujs
49
+ //= require popper
39
50
  //= require bootstrap
40
- //= require summernote
41
- //= require ...
51
+ //= require summernote/summernote-bs4
52
+ //= require activestorage
53
+ //= require turbolinks
54
+ //= require_tree .
42
55
  ```
43
56
 
44
57
  Basic Example:
45
58
 
46
- ```html
47
- <div id="summernote">Hello Summernote</div>
48
-
49
- <script type="text/javascript">
50
- $(document).ready(function() {
51
- $('#summernote').summernote();
52
- });
53
- </script>
54
- ```
55
- Or, if your want to use javascript with unobtrusive pattern, you can move the javascript script code lines to app/assets/javascripts/summernote_bootstraped.coffee as follows:
56
-
57
- ```coffee
58
- $ ->
59
- $('#summernote').summernote()
60
- ```
61
-
62
- Ideally, you would do it like this:
63
-
64
- ```javscript
65
- # This goes into your main javascript file. Customize as you need.
66
-
67
- $('[data-provider="summernote"]').each(function(){
68
- $(this).summernote({ });
69
- })
70
- ```
71
-
72
- Or, if you want to code in coffeescript,
59
+ After creating app/assets/javascripts/summernote-init.coffee, you can write codes as follows:
73
60
 
74
61
  ```coffeescript
75
- $ ->
62
+ $(document).on 'turbolinks:load', ->
76
63
  $('[data-provider="summernote"]').each ->
77
- $(this).summernote()
64
+ $(this).summernote
65
+ height: 300
78
66
  ```
79
67
 
68
+ And you should require this file in application.js.
69
+
80
70
  Then, if you are using simple_form, you can use the `:summernote` input type. This type simply adds the `data-provider="summernote"` to the field.
81
71
 
82
72
  ```erb
@@ -114,24 +104,12 @@ If you use i18n, you have to include language files. In `app/assets/javascripts/
114
104
 
115
105
  and update summernote option
116
106
 
117
- ```html
118
- <div id="summernote">Hello Summernote</div>
119
-
120
- <script type="text/javascript">
121
- $(document).ready(function() {
122
- $('#summernote').summernote({
123
- lang: 'ko-KR'
124
- });
125
- });
126
- </script>
127
- ```
128
-
129
- Also, you can move the above javascript code lines to app/assets/javascripts/summernote_bootstraped.coffee and add as follows:
130
-
131
107
  ```coffee
132
- $ ->
133
- $('#summernote').summernote
134
- lang: 'ko-KR'
108
+ $(document).on 'turbolinks:load', ->
109
+ $('[data-provider="summernote"]').each ->
110
+ $(this).summernote
111
+ lang: 'ko-KR'
112
+ height: 300
135
113
  ```
136
114
 
137
115
  ### Plugin
@@ -145,27 +123,12 @@ If you want to use a plugin, you have to include the corresponding file. In `app
145
123
 
146
124
  and update summernote option.
147
125
 
148
- ```html
149
- <div id="summernote">Hello Summernote</div>
150
-
151
- <script type="text/javascript">
152
- $(document).ready(function() {
153
- $('#summernote').summernote({
154
- toolbar : [
155
- ...
156
- ['insert', [ 'hello' ]]
157
- ...
158
- ]
159
- });
160
- });
161
- </script>
162
- ```
163
-
164
- Also, you can move the above javascript code lines to app/assets/javascripts/summernote_bootstraped.coffee and add as follows:
165
-
166
126
  ```coffee
167
- $ ->
168
- $('#summernote').summernote
127
+ $(document).on 'turbolinks:load', ->
128
+ $('[data-provider="summernote"]').each ->
129
+ $(this).summernote
130
+ lang: 'ko-KR'
131
+ height: 300
169
132
  toolbar : [
170
133
  ...
171
134
  [
@@ -1,5 +1,5 @@
1
1
  module SummernoteRails
2
2
  module Rails
3
- VERSION = "0.8.8.0"
3
+ VERSION = "0.8.8.1"
4
4
  end
5
5
  end
@@ -0,0 +1,26 @@
1
+ .note-editor {
2
+ .note-btn {
3
+ background-color: white;
4
+ border-color: #ccc;
5
+ i::before {
6
+ margin-top: -4px;
7
+ }
8
+ }
9
+
10
+ .help-list-item + label {
11
+ display: inline-block;
12
+ }
13
+
14
+ .modal-header {
15
+ button.close {
16
+ font-size: 1.2em;
17
+ }
18
+ }
19
+
20
+ .modal-footer {
21
+ display: inline-block;
22
+ p:last-child {
23
+ margin-bottom: 0 !important;
24
+ }
25
+ }
26
+ }
@@ -0,0 +1 @@
1
+ .note-editor{.note-btn{background-color:white;border-color:#ccc;i::before{margin-top:-4px}}.help-list-item + label{display:inline-block}.modal-header{button.close{font-size:1.2em}}.modal-footer{display:inline-block;p:last-child{margin-bottom:0!important}}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: summernote-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.8.0
4
+ version: 0.8.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hyo Seong Choi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-28 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -121,6 +121,8 @@ files:
121
121
  - vendor/assets/javascripts/summernote/summernote-lite.js
122
122
  - vendor/assets/javascripts/summernote/summernote.js
123
123
  - vendor/assets/stylesheets/summernote-bs4.css
124
+ - vendor/assets/stylesheets/summernote-custom-theme.css
125
+ - vendor/assets/stylesheets/summernote-custom-theme.min.css
124
126
  - vendor/assets/stylesheets/summernote-lite.css
125
127
  - vendor/assets/stylesheets/summernote.css
126
128
  homepage: https://github.com/summernote/summernote-rails
@@ -143,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
145
  version: '0'
144
146
  requirements: []
145
147
  rubyforge_project:
146
- rubygems_version: 2.7.4
148
+ rubygems_version: 2.7.3
147
149
  signing_key:
148
150
  specification_version: 4
149
151
  summary: Gemify Summernote for Ruby on Rails