зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-06 19:55:50 +03:00
v0.2.8
Этот коммит содержится в:
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2017 Mattia Roccoberton
|
Copyright (c) 2017-2020 Mattia Roccoberton
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|||||||
23
README.md
23
README.md
@@ -5,14 +5,13 @@ An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quillj
|
|||||||

|

|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
- After installing Active Admin, add to your Gemfile: `gem 'activeadmin_quill_editor'` (and execute *bundle*)
|
||||||
- Update your Gemfile: `gem 'activeadmin_quill_editor'` (and execute *bundle*)
|
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
|
||||||
- Add at the end of your ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):
|
|
||||||
```scss
|
```scss
|
||||||
@import 'activeadmin/quill_editor/quill.snow';
|
@import 'activeadmin/quill_editor/quill.snow';
|
||||||
@import 'activeadmin/quill_editor_input';
|
@import 'activeadmin/quill_editor_input';
|
||||||
```
|
```
|
||||||
- Add at the end of your ActiveAdmin javascripts (_app/assets/javascripts/active_admin.js_):
|
- Add at the end of your Active Admin javascripts (_app/assets/javascripts/active_admin.js_):
|
||||||
```js
|
```js
|
||||||
//= require activeadmin/quill_editor/quill
|
//= require activeadmin/quill_editor/quill
|
||||||
//= require activeadmin/quill_editor_input
|
//= require activeadmin/quill_editor_input
|
||||||
@@ -24,13 +23,14 @@ Why 2 separated scripts? In this way you can include a different version of *qui
|
|||||||
> **UPDATE FROM VERSION <= 2.0**: please add to your _app/assets/stylesheets/active_admin.scss_ the line `@import 'activeadmin/quill_editor/quill.snow';`
|
> **UPDATE FROM VERSION <= 2.0**: please add to your _app/assets/stylesheets/active_admin.scss_ the line `@import 'activeadmin/quill_editor/quill.snow';`
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
**data-options**: permits to set *quill editor* options directly - see [options list](https://quilljs.com/docs/configuration/)
|
**data-options**: permits to set *quill editor* options directly - see [options list](https://quilljs.com/docs/configuration/)
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
### Basic usage
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
# ActiveAdmin article form conf:
|
# Active Admin article form conf:
|
||||||
form do |f|
|
form do |f|
|
||||||
f.inputs 'Article' do
|
f.inputs 'Article' do
|
||||||
f.input :title
|
f.input :title
|
||||||
@@ -41,26 +41,23 @@ Why 2 separated scripts? In this way you can include a different version of *qui
|
|||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
Toolbar buttons configuration:
|
### Toolbar buttons configuration
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
f.input :description, as: :quill_editor, input_html: {data: {options: {modules: {toolbar: [['bold', 'italic', 'underline'], ['link']]}, placeholder: 'Type something...', theme: 'snow'}}}
|
f.input :description, as: :quill_editor, input_html: {data: {options: {modules: {toolbar: [['bold', 'italic', 'underline'], ['link']]}, placeholder: 'Type something...', theme: 'snow'}}}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
- Upload functions (Images, Documents, Files, etc.) are not implemented yet
|
- Upload functions (Images, Documents, Files, etc.) are not implemented yet
|
||||||
|
|
||||||
## Do you like it? Star it!
|
## Do you like it? Star it!
|
||||||
|
|
||||||
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
|
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- [Mattia Roccoberton](http://blocknot.es): author
|
- [Mattia Roccoberton](http://blocknot.es): author
|
||||||
|
- The good guys that opened issues and pull requests from time to time
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
- The gem is available as open-source under the terms of the [MIT](LICENSE.txt)
|
||||||
[MIT](LICENSE.txt)
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
module ActiveAdmin
|
module ActiveAdmin
|
||||||
module QuillEditor
|
module QuillEditor
|
||||||
VERSION = '0.2.4'
|
VERSION = '0.2.8'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user