https://github.com/wvengen/rails_admin_tinymce
TinyMCE for Rails Admin
https://github.com/wvengen/rails_admin_tinymce
rails-admin ruby ruby-on-rails tinymce
Last synced: 9 months ago
JSON representation
TinyMCE for Rails Admin
- Host: GitHub
- URL: https://github.com/wvengen/rails_admin_tinymce
- Owner: wvengen
- License: mit
- Created: 2023-11-03T18:42:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-06T07:34:02.000Z (over 2 years ago)
- Last Synced: 2025-07-09T10:19:02.645Z (12 months ago)
- Topics: rails-admin, ruby, ruby-on-rails, tinymce
- Language: Ruby
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TinyMCE plugin for `rails_admin`
[](https://badge.fury.io/rb/rails_admin_tinymce)
[RailsAdmin](https://github.com/sferik/rails_admin) extension for enabling the [TinyMCE](https://www.tiny.cloud/) editor.
- Does not yet support ActiveStorage for image/files.
- Tested with [tinymce-rails](https://github.com/spohlenz/tinymce-rails) 6.7.2.
- Turbo Drive is supported (even though tinymce-rails doesn't support it yet).
## Installation
To enable **rails_admin_tinymce**, add the following to your `Gemfile`:
```ruby
gem 'rails_admin'
gem 'rails_admin_tinymce'
```
Then create `config/tinymce.yml` according to step 2 of [tinymce-rails' instructions](https://github.com/spohlenz/tinymce-rails#instructions).
Finally make sure the TinyMCE Javascript is loaded. That may differ depending on how you're using Javascript in Ruby on Rails.
### Importmap
Add to `importmap.rails_admin.rb`:
```rb
pin 'tinymce'
pin 'tinymce.rails_admin'
```
Add to `rails_admin.js`:
```javascript
import 'tinymce';
import 'tinymce.rails_admin';
```
### Bundler
TODO
## Configuration
```ruby
RailsAdmin.config do |config|
config.model Team do
edit do
field :description, :tinymce
end
end
end
```
Or, you can provide more options to customize:
```ruby
RailsAdmin.config do |config|
config.model Team do
edit do
field :description, :tinymce do
# choose another configuration set from tinymce.yml
config 'alternate'
# or override specific options, see https://www.tiny.cloud/docs/tinymce/6/basic-setup/
options ({ plugins: [:image, :link] })
end
end
end
end
```
## License
The gem is available as open source under the terms of the [MIT License](LICENSE).