Administrate::Field::Froala
A plugin for adding Froala editor support in Administrate.
Usage
Add to your Gemfile
:
gem "administrate-field-froala", "~> 0.1"
Run:
$ bundle install
Add to your FooDashboard
:
ATTRIBUTE_TYPES = [
description: Field::Froala,
]
In your application.js
require and initialize the Froala editor (and plugins if needed):
$(function () {
$('.field-unit--froala textarea').froalaEditor();
});
Similarly require the stylesheets for Froala and it's plugins in your application.css
:
See wysiwyg-rails documentation for list of all available Froala plugins.
Administrate::Field::Froala is heavily inspired by (a.k.a. copied after) Administrate::Field::Ckeditor by Jemcode Limited.