{"id":15464890,"url":"https://github.com/blocknotes/activeadmin_medium_editor","last_synced_at":"2025-04-15T11:53:33.684Z","repository":{"id":23977570,"uuid":"100303982","full_name":"blocknotes/activeadmin_medium_editor","owner":"blocknotes","description":"Medium Editor for ActiveAdmin","archived":false,"fork":false,"pushed_at":"2022-04-19T19:30:05.000Z","size":2535,"stargazers_count":29,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T19:45:10.112Z","etag":null,"topics":["activeadmin","activeadmin-plugin","rails","ruby","ruby-on-rails"],"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},"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-08-14T19:50:09.000Z","updated_at":"2024-08-08T22:35:34.000Z","dependencies_parsed_at":"2022-07-27T04:17:35.964Z","dependency_job_id":null,"html_url":"https://github.com/blocknotes/activeadmin_medium_editor","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_medium_editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_medium_editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_medium_editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blocknotes%2Factiveadmin_medium_editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blocknotes","download_url":"https://codeload.github.com/blocknotes/activeadmin_medium_editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248946538,"owners_count":21187516,"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","ruby","ruby-on-rails"],"created_at":"2024-10-02T00:43:34.201Z","updated_at":"2025-04-15T11:53:33.664Z","avatar_url":"https://github.com/blocknotes.png","language":"JavaScript","readme":"# Active Admin Medium Editor\n[![gem version](https://badge.fury.io/rb/activeadmin_medium_editor.svg)](https://badge.fury.io/rb/activeadmin_medium_editor)\n[![Gem downloads](https://badgen.net/rubygems/dt/activeadmin_medium_editor)](https://rubygems.org/gems/activeadmin_medium_editor)\n[![linters](https://github.com/blocknotes/activeadmin_medium_editor/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/activeadmin_medium_editor/actions/workflows/linters.yml)\n[![specs Rails 6.1](https://github.com/blocknotes/activeadmin_medium_editor/actions/workflows/specs_rails61.yml/badge.svg)](https://github.com/blocknotes/activeadmin_medium_editor/actions/workflows/specs_rails61.yml)\n[![specs Rails 7.0](https://github.com/blocknotes/activeadmin_medium_editor/actions/workflows/specs_rails70.yml/badge.svg)](https://github.com/blocknotes/activeadmin_medium_editor/actions/workflows/specs_rails70.yml)\n\nAn Active Admin plugin to use [medium-editor](https://github.com/yabwe/medium-editor), a compact and clean WYSIWYG editor.\n\n**IMPORTANT NOTICE**: while I like the Medium Editor idea of having floating buttons, it looks like that they are slow to release new stable versions. Some editor bugs are related to this problem unfortunately.\n\n![screenshot](extra/screenshot.png)\n\n## Usage\n\n- After the installation, select some text in the editor\n- A pop-up menu is shown with the available buttons\n- Click on a button and the effect will be applied to the selected text\n\n## Install\n\n- After installing Active Admin, add to your Gemfile: `gem 'activeadmin_medium_editor'`\n- Add also 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/medium_editor/medium_editor';\n@import 'activeadmin/medium_editor_input';\n@import 'activeadmin/medium_editor/themes/default'; // or another theme\n```\n- Add at the end of your Active Admin javascripts (_app/assets/javascripts/active_admin.js_):\n```js\n//= require activeadmin/medium_editor/medium_editor\n//= require activeadmin/medium_editor_input\n```\n- Use the input with `as: :medium_editor` in Active Admin model conf\n- **data-options**: permits to set *medium-editor* options directly - see [options list](https://github.com/yabwe/medium-editor#mediumeditor-options) (examples below)\n\n\u003e Why 2 separated scripts/styles? In this way you can include a different version of *medium-editor* if you like\n\n\u003e **UPDATE FROM VERSION \u003c 0.2.8**: please change your _app/assets/stylesheets/active_admin.scss_ using the new import lines above\n\n## Examples\n\n### Basic usage\n\n```ruby\n# Active Admin post form conf:\n  form do |f|\n    f.inputs 'Post' do\n      f.input :title\n      f.input :description, as: :medium_editor, input_html: { data: { options: '{\"spellcheck\":false,\"toolbar\":{\"buttons\":[\"bold\",\"italic\",\"underline\",\"anchor\"]}}' } }\n      f.input :published\n    end\n    f.actions\n  end\n```\n\n### Buttons configuration\n\n```ruby\ntoolbar = { buttons: %w[bold italic underline strikethrough subscript superscript anchor image quote pre orderedlist unorderedlist indent outdent justifyLeft justifyCenter justifyRight justifyFull h1 h2 h3 h4 h5 h6 removeFormat html] }\nf.input :description, as: :medium_editor, input_html: { data: { options: { toolbar: toolbar } } }\n```\n\nFor details about the buttons' effect please refer to medium-editor documentation.\n\n## Changelog\n\nThe changelog is available [here](CHANGELOG.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## Contributors\n\n- [Mattia Roccoberton](https://blocknot.es): author\n- The good guys that opened issues and pull requests from time to time\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_medium_editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblocknotes%2Factiveadmin_medium_editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblocknotes%2Factiveadmin_medium_editor/lists"}