You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-5Lines changed: 18 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,10 @@ An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quillj
5
5

6
6
7
7
## Install
8
-
- After installing Active Admin, add to your Gemfile: `gem 'activeadmin_quill_editor'` (and execute *bundle*)
8
+
After installing Active Admin, add to your Gemfile: `gem 'activeadmin_quill_editor'` (and execute *bundle*)
9
+
10
+
If you installed Active Admin without Webpacker support (default for now):
11
+
9
12
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
10
13
```scss
11
14
@import'activeadmin/quill_editor/quill.snow';
@@ -16,13 +19,23 @@ An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quillj
16
19
//= require activeadmin/quill_editor/quill
17
20
//= require activeadmin/quill_editor_input
18
21
```
19
-
- Use the input with `as: :quill_editor` in Active Admin model conf
20
-
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
25
-
## Options
25
+
If you installed Active Admin with Webpacker support:
26
+
27
+
- Execute in your project root:
28
+
```sh
29
+
yarn add blocknotes/activeadmin_quill_editor
30
+
```
31
+
- Add to your *app/javascript/packs/active_admin.js*:
32
+
```js
33
+
require('activeadmin_quill_editor')
34
+
```
35
+
36
+
## Usage
37
+
In your Active Admin models, form configuration, set the text inputs with `as: :quill_editor` where needed.
38
+
26
39
**data-options**: permits to set *quill editor* options directly - see [options list](https://quilljs.com/docs/configuration/)
0 commit comments