activeadmin_quill_editor 0.2.4 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +14 -15
- data/Rakefile +10 -0
- data/app/assets/stylesheets/activeadmin/_quill_editor_input.scss +19 -4
- data/lib/activeadmin/quill_editor/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad04679c2c87aaf9cc8e2e8577ec9b9f216b91c0c61692f5261e126047ece83d
|
4
|
+
data.tar.gz: 7afbcb26e9049f76a48582c4c8fbdf4e7a09a592a4a0cc95ffb023d47b12d01f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6188c7952e753a9d6da501062d2e779c25759b2dd1441b8cf9475ecfa0d5e0e8d299e15f3ae8cfe745181539c710a7f670fd6b727d0b043781662eb730f77914
|
7
|
+
data.tar.gz: 1d918e65c25b1771af61473fda8a961ba9d6b3d0f0dad3d5a598998684e79f065c0f04a94caf32e32ab02e11dfbffa216ad3f50a808933588a96764b04f9fc2b
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,18 +1,17 @@
|
|
1
|
-
# ActiveAdmin Quill Editor [](https://badge.fury.io/rb/activeadmin_quill_editor)
|
1
|
+
# ActiveAdmin Quill Editor [](https://badge.fury.io/rb/activeadmin_quill_editor) [](https://circleci.com/gh/blocknotes/activeadmin_quill_editor)
|
2
2
|
|
3
3
|
An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quilljs/quill)
|
4
4
|
|
5
|
-

|
6
6
|
|
7
7
|
## Install
|
8
|
-
|
9
|
-
-
|
10
|
-
- Add at the end of your ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):
|
8
|
+
- After installing Active Admin, add to your Gemfile: `gem 'activeadmin_quill_editor'` (and execute *bundle*)
|
9
|
+
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
|
11
10
|
```scss
|
12
11
|
@import 'activeadmin/quill_editor/quill.snow';
|
13
12
|
@import 'activeadmin/quill_editor_input';
|
14
13
|
```
|
15
|
-
- Add at the end of your
|
14
|
+
- Add at the end of your Active Admin javascripts (_app/assets/javascripts/active_admin.js_):
|
16
15
|
```js
|
17
16
|
//= require activeadmin/quill_editor/quill
|
18
17
|
//= require activeadmin/quill_editor_input
|
@@ -21,14 +20,17 @@ An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quillj
|
|
21
20
|
|
22
21
|
Why 2 separated scripts? In this way you can include a different version of *quill editor* if you like.
|
23
22
|
|
24
|
-
|
23
|
+
> **UPDATE FROM VERSION <= 2.0**: please add to your _app/assets/stylesheets/active_admin.scss_ the line `@import 'activeadmin/quill_editor/quill.snow';`
|
25
24
|
|
25
|
+
## Options
|
26
26
|
**data-options**: permits to set *quill editor* options directly - see [options list](https://quilljs.com/docs/configuration/)
|
27
27
|
|
28
28
|
## Examples
|
29
29
|
|
30
|
+
### Basic usage
|
31
|
+
|
30
32
|
```ruby
|
31
|
-
#
|
33
|
+
# Active Admin article form conf:
|
32
34
|
form do |f|
|
33
35
|
f.inputs 'Article' do
|
34
36
|
f.input :title
|
@@ -39,26 +41,23 @@ Why 2 separated scripts? In this way you can include a different version of *qui
|
|
39
41
|
end
|
40
42
|
```
|
41
43
|
|
42
|
-
Toolbar buttons configuration
|
44
|
+
### Toolbar buttons configuration
|
43
45
|
|
44
46
|
```ruby
|
45
47
|
f.input :description, as: :quill_editor, input_html: {data: {options: {modules: {toolbar: [['bold', 'italic', 'underline'], ['link']]}, placeholder: 'Type something...', theme: 'snow'}}}
|
46
48
|
```
|
47
49
|
|
48
50
|
## Notes
|
49
|
-
|
50
51
|
- Upload functions (Images, Documents, Files, etc.) are not implemented yet
|
51
52
|
|
52
53
|
## Do you like it? Star it!
|
53
|
-
|
54
54
|
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
|
55
55
|
|
56
|
-
Take a look at [other
|
56
|
+
Take a look at [other Active Admin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source) that I made if you are curious.
|
57
57
|
|
58
58
|
## Contributors
|
59
|
-
|
60
59
|
- [Mattia Roccoberton](http://blocknot.es): author
|
60
|
+
- The good guys that opened issues and pull requests from time to time
|
61
61
|
|
62
62
|
## License
|
63
|
-
|
64
|
-
[MIT](LICENSE.txt)
|
63
|
+
- The gem is available as open-source under the terms of the [MIT](LICENSE.txt)
|
data/Rakefile
CHANGED
@@ -1,10 +1,20 @@
|
|
1
1
|
body.active_admin .quill-editor {
|
2
2
|
display: inline-block;
|
3
|
-
width: calc(80% -
|
3
|
+
width: calc(80% - 2px);
|
4
4
|
|
5
|
-
button
|
6
|
-
|
7
|
-
|
5
|
+
button {
|
6
|
+
text-shadow: none;
|
7
|
+
box-shadow: none;
|
8
|
+
|
9
|
+
&:hover {
|
10
|
+
background-image: none;
|
11
|
+
background-color: transparent;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
.ql-container {
|
16
|
+
border: 1px solid #c9d0d6;
|
17
|
+
border-radius: 0 0 3px 3px;
|
8
18
|
}
|
9
19
|
|
10
20
|
.ql-editor {
|
@@ -37,4 +47,9 @@ body.active_admin .quill-editor {
|
|
37
47
|
padding-left: 1.5em;
|
38
48
|
}
|
39
49
|
}
|
50
|
+
|
51
|
+
.ql-toolbar {
|
52
|
+
border: 1px solid #c9d0d6;
|
53
|
+
border-radius: 3px 3px 0 0;
|
54
|
+
}
|
40
55
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_quill_editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|
@@ -109,33 +109,33 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 4.0.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rubocop
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
117
|
+
version: 0.90.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
124
|
+
version: 0.90.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: selenium-webdriver
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 3.142.7
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
138
|
+
version: 3.142.7
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: sqlite3
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|