activeadmin_quill_editor 0.2.8 → 0.2.9
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f42a9042c7220f4a77082d6f3dd2c9a33219f7d6d9d90a99394e166faeb8cc1e
|
|
4
|
+
data.tar.gz: f46e1e841a1cbe9b38d158a5b80e2776c21b77f5f675a552d9f9d9d76991a92a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a22cefc16231c2d08a3336f10579783de82daacdb7075120506ec557ee0548bcc74f1e750ac75208893a56bee119819a7671db0624b5e03403f8780bf17611ab
|
|
7
|
+
data.tar.gz: 8cc61172369187fdecaeddca938fddae91aacac933aafe02303122329aec91dc88d844544ba4ebe1f1ccbc802170e37b20a5c6b3123e210d793a8302fdc4505e
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ActiveAdmin Quill Editor [](https://badge.fury.io/rb/activeadmin_quill_editor) [](https://circleci.com/gh/blocknotes/activeadmin_quill_editor)
|
|
2
2
|
|
|
3
|
-
An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quilljs/quill)
|
|
3
|
+
An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quilljs/quill) in form fields.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quillj
|
|
|
18
18
|
```
|
|
19
19
|
- Use the input with `as: :quill_editor` in Active Admin model conf
|
|
20
20
|
|
|
21
|
-
Why 2 separated scripts? In this way you can include a different version of *quill editor* if you like.
|
|
21
|
+
Why 2 separated scripts/styles? In this way you can include a different version of *quill editor* if you like.
|
|
22
22
|
|
|
23
23
|
> **UPDATE FROM VERSION <= 2.0**: please add to your _app/assets/stylesheets/active_admin.scss_ the line `@import 'activeadmin/quill_editor/quill.snow';`
|
|
24
24
|
|
|
@@ -44,11 +44,11 @@ Why 2 separated scripts? In this way you can include a different version of *qui
|
|
|
44
44
|
### Toolbar buttons configuration
|
|
45
45
|
|
|
46
46
|
```ruby
|
|
47
|
-
f.input :description, as: :quill_editor, input_html: {data: {options: {modules: {toolbar: [['bold', 'italic', 'underline'], ['link']]}, placeholder: 'Type something...', theme: 'snow'}}}
|
|
47
|
+
f.input :description, as: :quill_editor, input_html: { data: { options: { modules: { toolbar: [['bold', 'italic', 'underline'], ['link']] }, placeholder: 'Type something...', theme: 'snow' } } }
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
## Notes
|
|
51
|
-
- Upload
|
|
51
|
+
- Upload features (images/documents/files): not tested yet.
|
|
52
52
|
|
|
53
53
|
## Do you like it? Star it!
|
|
54
54
|
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
|
|
@@ -60,4 +60,4 @@ Take a look at [other Active Admin components](https://github.com/blocknotes?utf
|
|
|
60
60
|
- The good guys that opened issues and pull requests from time to time
|
|
61
61
|
|
|
62
62
|
## License
|
|
63
|
-
|
|
63
|
+
The gem is available as open-source under the terms of the [MIT](LICENSE.txt).
|
|
@@ -30,7 +30,11 @@ function initQuillEditors() {
|
|
|
30
30
|
formtastic.onsubmit = function() {
|
|
31
31
|
for(var i = 0; i < editors.length; i++) {
|
|
32
32
|
var input = editors[i].querySelector('input[type="hidden"]');
|
|
33
|
-
|
|
33
|
+
if (editors[i]['_quill-editor'].editor.isBlank()) {
|
|
34
|
+
input.value = '';
|
|
35
|
+
} else {
|
|
36
|
+
input.value = editors[i]['_quill-editor'].root.innerHTML;
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
};
|
|
36
40
|
}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
// reset internal elements
|
|
2
|
+
.ql-editor * {
|
|
3
|
+
margin: initial;
|
|
4
|
+
padding: initial;
|
|
5
|
+
text-align: initial;
|
|
6
|
+
}
|
|
7
|
+
|
|
1
8
|
body.active_admin .quill-editor {
|
|
2
9
|
display: inline-block;
|
|
3
10
|
width: calc(80% - 2px);
|
|
@@ -23,13 +30,6 @@ body.active_admin .quill-editor {
|
|
|
23
30
|
min-height: 150px;
|
|
24
31
|
padding: 10px;
|
|
25
32
|
|
|
26
|
-
// reset internal elements
|
|
27
|
-
* {
|
|
28
|
-
margin: initial;
|
|
29
|
-
padding: initial;
|
|
30
|
-
text-align: initial;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
33
|
ol {
|
|
34
34
|
list-style-type: decimal;
|
|
35
35
|
}
|
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.9
|
|
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-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activeadmin
|