activeadmin_quill_editor 0.2.4 → 0.2.8

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: 6f989d7ad5b9adc4bfdfeabc7b750379cac05dab61394d778d147acce31c681a
4
- data.tar.gz: 2e3b77ebbcc3cce7338c3a65d751074d1517a7320acc4f6ef3c7b80bfe464f53
3
+ metadata.gz: ad04679c2c87aaf9cc8e2e8577ec9b9f216b91c0c61692f5261e126047ece83d
4
+ data.tar.gz: 7afbcb26e9049f76a48582c4c8fbdf4e7a09a592a4a0cc95ffb023d47b12d01f
5
5
  SHA512:
6
- metadata.gz: 2dc76a0740fa5f5664309795c9ee87d029fce479e61dd8093c91d3510de1d0fc5f737d36efe56b32920eb4931b44fef63ed3d92bcb04bf32de494f903fae71cc
7
- data.tar.gz: 394ae3ac8ec352ef335ae051dde2e50c6d40f0aaef0331bf9cb6dc00d6e11878950c632e6ef1dab16f03e030090fce9c869e5d9af25987319e9e0f491014a5e1
6
+ metadata.gz: 6188c7952e753a9d6da501062d2e779c25759b2dd1441b8cf9475ecfa0d5e0e8d299e15f3ae8cfe745181539c710a7f670fd6b727d0b043781662eb730f77914
7
+ data.tar.gz: 1d918e65c25b1771af61473fda8a961ba9d6b3d0f0dad3d5a598998684e79f065c0f04a94caf32e32ab02e11dfbffa216ad3f50a808933588a96764b04f9fc2b
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017 Mattia Roccoberton
1
+ Copyright (c) 2017-2020 Mattia Roccoberton
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,18 +1,17 @@
1
- # ActiveAdmin Quill Editor [![Gem Version](https://badge.fury.io/rb/activeadmin_quill_editor.svg)](https://badge.fury.io/rb/activeadmin_quill_editor)
1
+ # ActiveAdmin Quill Editor [![Gem Version](https://badge.fury.io/rb/activeadmin_quill_editor.svg)](https://badge.fury.io/rb/activeadmin_quill_editor) [![CircleCI](https://circleci.com/gh/blocknotes/activeadmin_quill_editor.svg?style=svg)](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
- ![screenshot](screenshot.jpg)
5
+ ![screenshot](screenshot.png)
6
6
 
7
7
  ## Install
8
-
9
- - Update your Gemfile: `gem 'activeadmin_quill_editor'` (and execute *bundle*)
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 ActiveAdmin javascripts (_app/assets/javascripts/active_admin.js_):
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
- ## Options
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
- # ActiveAdmin article form conf:
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 ActiveAdmin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source) that I made if you are curious.
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,3 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'bundler/gem_tasks'
4
+
5
+ begin
6
+ require 'rspec/core/rake_task'
7
+
8
+ RSpec::Core::RakeTask.new(:spec)
9
+
10
+ task default: :spec
11
+ rescue LoadError
12
+ puts '! LoadError: no RSpec available'
13
+ end
@@ -1,10 +1,20 @@
1
1
  body.active_admin .quill-editor {
2
2
  display: inline-block;
3
- width: calc(80% - 22px);
3
+ width: calc(80% - 2px);
4
4
 
5
- button:hover {
6
- background-image: none;
7
- background-color: rgba(0, 0, 0, 0.1);
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
  }
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveAdmin
4
4
  module QuillEditor
5
- VERSION = '0.2.4'
5
+ VERSION = '0.2.8'
6
6
  end
7
7
  end
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
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-01 00:00:00.000000000 Z
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: selenium-webdriver
112
+ name: rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 3.142.7
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: 3.142.7
124
+ version: 0.90.0
125
125
  - !ruby/object:Gem::Dependency
126
- name: simplecov
126
+ name: selenium-webdriver
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.19.0
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: 0.19.0
138
+ version: 3.142.7
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: sqlite3
141
141
  requirement: !ruby/object:Gem::Requirement