зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-04 02:35:51 +03:00
v0.2.4
Этот коммит содержится в:
@@ -8,7 +8,8 @@ An Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quillj
|
|||||||
|
|
||||||
- Update 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 ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):
|
- Add at the end of your ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):
|
||||||
```css
|
```scss
|
||||||
|
@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 ActiveAdmin javascripts (_app/assets/javascripts/active_admin.js_):
|
||||||
@@ -56,7 +57,7 @@ Take a look at [other ActiveAdmin components](https://github.com/blocknotes?utf8
|
|||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
|
||||||
- [Mattia Roccoberton](http://blocknot.es) - creator, maintainer
|
- [Mattia Roccoberton](http://blocknot.es): author
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
window.onload = function() {
|
function initQuillEditors() {
|
||||||
initQuillEditors();
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).on('has_many_add:after', function() {
|
|
||||||
initQuillEditors();
|
|
||||||
});
|
|
||||||
|
|
||||||
var initQuillEditors = function() {
|
|
||||||
var editors = document.querySelectorAll('.quill-editor');
|
var editors = document.querySelectorAll('.quill-editor');
|
||||||
var default_options = {
|
var default_options = {
|
||||||
modules: {
|
modules: {
|
||||||
@@ -42,4 +34,12 @@ var initQuillEditors = function() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
$(document).ready( function() {
|
||||||
|
initQuillEditors();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on('has_many_add:after', function() {
|
||||||
|
initQuillEditors();
|
||||||
|
});
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
@import 'activeadmin/quill_editor/quill.snow';
|
|
||||||
|
|
||||||
body.active_admin .quill-editor {
|
body.active_admin .quill-editor {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: calc(80% - 22px);
|
width: calc(80% - 22px);
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
module ActiveAdmin
|
module ActiveAdmin
|
||||||
module QuillEditor
|
module QuillEditor
|
||||||
VERSION = '0.2.0'
|
VERSION = '0.2.4'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
@import 'active_admin/mixins';
|
@import 'active_admin/mixins';
|
||||||
@import 'active_admin/base';
|
@import 'active_admin/base';
|
||||||
|
|
||||||
|
@import 'activeadmin/quill_editor/quill.snow';
|
||||||
@import 'activeadmin/quill_editor_input';
|
@import 'activeadmin/quill_editor_input';
|
||||||
|
|
||||||
// Overriding any non-variable SASS must be done after the fact.
|
// Overriding any non-variable SASS must be done after the fact.
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user