{"id":14955554,"url":"https://github.com/blocknotes/activeadmin_quill_editor","last_synced_at":"2025-10-08T18:02:42.799Z","repository":{"id":40327752,"uuid":"107048554","full_name":"blocknotes/activeadmin_quill_editor","owner":"blocknotes","description":"Quill Rich Text Editor for ActiveAdmin","archived":false,"fork":false,"pushed_at":"2025-03-22T08:14:36.000Z","size":426,"stargazers_count":155,"open_issues_count":1,"forks_count":31,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-04T02:19:22.618Z","etag":null,"topics":["activeadmin","activeadmin-plugin","rails","rails5","ruby"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blocknotes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["blocknotes"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2017-10-15T20:55:31.000Z","updated_at":"2025-03-22T08:14:38.000Z","dependencies_parsed_at":"2024-02-29T17:27:00.696Z","dependency_job_id":null,"html_url":"https://github.com/blocknotes/activeadmin_quill_editor","commit_stats":{"total_commits":67,"total_committers":9,"mean_commits":7.444444444444445,"dds":0.417910447761194,"last_synced_commit":"b00fcd90abf20737034cd2e3c61193f3ac444c1a"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_quill_editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_quill_editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_quill_editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_quill_editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blocknotes","download_url":"https://codeload.github.com/blocknotes/activeadmin_quill_editor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248423364,"owners_count":21100976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activeadmin","activeadmin-plugin","rails","rails5","ruby"],"created_at":"2024-09-24T13:11:21.494Z","updated_at":"2025-10-08T18:02:42.794Z","avatar_url":"https://github.com/blocknotes.png","language":"JavaScript","readme":"# ActiveAdmin Quill Editor\n[![gem version](https://badge.fury.io/rb/activeadmin_quill_editor.svg)](https://badge.fury.io/rb/activeadmin_quill_editor)\n[![gem downloads](https://badgen.net/rubygems/dt/activeadmin_quill_editor)](https://rubygems.org/gems/activeadmin_quill_editor)\n[![linters](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/linters.yml)\n\n[![specs Rails 6.1](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails61.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails61.yml)\n[![specs Rails 7.0](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails70.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails70.yml)\n[![Specs Rails 7.1](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails71.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails71.yml)\n[![Specs Rails 7.2](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails72.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails72.yml)\n[![Specs Rails 8.0](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails80.yml/badge.svg)](https://github.com/blocknotes/activeadmin_quill_editor/actions/workflows/specs_rails80.yml)\n\nAn Active Admin plugin to use [Quill Rich Text Editor](https://github.com/quilljs/quill) in form fields.\n\n![screenshot](extra/screenshot.png)\n\nPlease :star: if you like it.\n\n## Install\n\n_NOTE_: the gem 2.x provide Quill 2.x, while Quill 1.x is provided with the gem version 1.x\n\nAfter installing Active Admin, add to your Gemfile: `gem 'activeadmin_quill_editor'` (and execute *bundle*)\n\nIf you installed Active Admin without Webpacker support (default for now):\n\n- Add a SASS/SCSS gem to your Gemfile (ex. `gem 'sassc'`)\n- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):\n```scss\n@import 'activeadmin/quill_editor/quill.snow';\n@import 'activeadmin/quill_editor_input';\n```\n- Add at the end of your Active Admin javascripts (_app/assets/javascripts/active_admin.js_):\n```js\n//= require activeadmin/quill_editor/quill\n//= require activeadmin/quill_editor_input\n```\n\nIf you installed Active Admin with Webpacker support:\n\n- Execute in your project root:\n```sh\nyarn add blocknotes/activeadmin_quill_editor\n```\n- Add to your *app/javascript/packs/active_admin.js*:\n```js\nrequire('activeadmin_quill_editor')\n```\n\n## Usage\n\nIn your Active Admin models, form configuration, set the text inputs with `as: :quill_editor` where needed.\n\n**data-options**: permits to set *quill editor* options directly - see [options list](https://quilljs.com/docs/configuration/)\n\nIf you are using Action Text (`has_rich_text`) on the same field of the Quill editor please take a look at [this workaround](https://github.com/blocknotes/activeadmin_quill_editor/issues/33#issuecomment-1965996947) to avoid issues.\n\n## Examples\n\n### Basic usage\n\n```ruby\n# Active Admin article form conf:\n  form do |f|\n    f.inputs 'Article' do\n      f.input :title\n      f.input :description, as: :quill_editor\n      f.input :published\n    end\n    f.actions\n  end\n```\n\n### Toolbar buttons configuration\n\n```ruby\nf.input :description, as: :quill_editor, input_html: { data: { options: { modules: { toolbar: [['bold', 'italic', 'underline'], ['link']] }, placeholder: 'Type something...', theme: 'snow' } } }\n```\n\n### ImageUploader plugin\n\nThis plugin allows to upload images to the server (instead of storing them in *base64* by default), reference [here](https://github.com/NoelOConnell/quill-image-uploader).\n\n```ruby\n# Upload method (to be included in the admin entity configuration)\nmember_action :upload, method: [:post] do\n  result = { success: resource.images.attach(params[:file_upload]) }\n  result[:url] = url_for(resource.images.last) if result[:success]\n  render json: result\nend\n```\n\n```ruby\n# Form field\nunless object.new_record?\n  plugin_opts = { image_uploader: { server_url: upload_admin_post_path(object.id), field_name: 'file_upload' } }\n  f.input :description, as: :quill_editor, input_html: { data: { plugins: plugin_opts } }\nend\n```\n\nFor the relevant files of the upload example see [here](examples/upload_plugin_using_activestorage/).\nConsider that this is just a basic example: images are uploaded as soon as they are attached to the\n editor (regardless of the form submit), it shows the editor only for an existing record (because of\nthe *upload_admin_post_path*) and it doesn't provide a way to remove images (just deleting them from\nthe editor will not destroy them, you'll need to implement a purge logic for that).\n\n## Javascript API\n\nSome methods are provided for advanced use cases:\n\n- `window.getQuillEditors()`: returns all the available Quill editors instances;\n- `window.getQuillEditorByIndex(n)`: returns the N-th Quill editor instance;\n- `window.getQuillEditorByElementId(id)`: returns the Quill editor instance related to the specified element id (e.g. _article_description_).\n\n## Development\n\nProject created by [Mattia Roccoberton](http://blocknot.es), thanks also to the good guys that opened issues and pull requests from time to time.\n\nFor development information please check [this document](extra/development.md).\n\n## Do you like it? Star it!\n\nIf you use this component just star it. A developer is more motivated to improve a project when there is some interest. My other [Active Admin components](https://github.com/blocknotes?utf8=✓\u0026tab=repositories\u0026q=activeadmin\u0026type=source).\n\nOr consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me).\n\n## License\n\nThe gem is available as open-source under the terms of the [MIT](LICENSE.txt).\n","funding_links":["https://github.com/sponsors/blocknotes"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocknotes%2Factiveadmin_quill_editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblocknotes%2Factiveadmin_quill_editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocknotes%2Factiveadmin_quill_editor/lists"}