https://github.com/varvet/godmin-medium
https://github.com/varvet/godmin-medium
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/varvet/godmin-medium
- Owner: varvet
- License: mit
- Created: 2015-04-24T08:24:22.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-20T21:04:13.000Z (over 9 years ago)
- Last Synced: 2025-07-27T19:51:01.294Z (2 months ago)
- Language: Ruby
- Size: 211 KB
- Stars: 0
- Watchers: 14
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Godmin Medium
[](https://rubygems.org/gems/godmin-medium)
Godmin Medium is a [MediumEditor](https://github.com/daviferreira/medium-editor) component for [Godmin](https://github.com/varvet/godmin) that adds an `f.medium_area` to forms.
## Installation
Add the gem to the application's `Gemfile`:
```ruby
gem "godmin-medium"
```Or to the admin engine's `gemspec`:
```ruby
s.add_dependency "godmin-medium", "~> 0.1.0"
```Require it in your `app/assets/javascripts/application.js`, just after the `require godmin` line:
```js
//= require godmin
//= require godmin-medium
```And finally, do the same with your `app/assets/stylesheets/application.css`:
```scss
*= require godmin
*= require godmin-medium
```## Usage
Use the medium area in your form like so:
```erb
<%= form_for @resource do |f| %>
<%= f.text_field :title %>
<%= f.medium_area :body, {
buttons: ['bold', 'italic', 'underline', 'strikethrough', 'quote', 'anchor']
} %>
<%= f.submit %>
<% end %>
```## Contributors
https://github.com/varvet/godmin-medium/graphs/contributors
## License
Godmin Medium is licensed under the MIT license. See the separate MIT-LICENSE file.