Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 days 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 (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-06T07:34:02.000Z (about 1 year ago)
- Last Synced: 2024-12-15T06:19:16.125Z (7 days 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`
[![Gem Version](https://badge.fury.io/rb/rails_admin_tinymce.svg)](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).