All Projects → blocknotes → Activeadmin_froala_editor

blocknotes / Activeadmin_froala_editor

Licence: mit
Froala WYSIWYG editor for ActiveAdmin

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Activeadmin froala editor

Activeadmin trumbowyg
Trumbowyg Editor for ActiveAdmin
Stars: ✭ 29 (-3.33%)
Mutual labels:  activeadmin, rails, rails5
Activeadmin dynamic fields
ActiveAdmin plugin to add dynamic behaviors to fields
Stars: ✭ 73 (+143.33%)
Mutual labels:  activeadmin, rails, rails5
Reactchat
A chat app built with React.js and ActionCable in Ruby on Rails 5.1
Stars: ✭ 90 (+200%)
Mutual labels:  rails, ruby-on-rails, rails5
Activeadmin quill editor
Quill Rich Text Editor for ActiveAdmin
Stars: ✭ 76 (+153.33%)
Mutual labels:  activeadmin, rails, rails5
Activeadmin blaze theme
ActiveAdmin theme based on Blaze CSS toolkit
Stars: ✭ 35 (+16.67%)
Mutual labels:  activeadmin, rails, rails5
activeadmin active resource
Active Admin + Active Resource: to use a REST API in place of a local database as data source
Stars: ✭ 20 (-33.33%)
Mutual labels:  activeadmin, rails5, ruby-on-rails
Devise masquerade
Extension for devise, enable login as functionality. Add link to the masquerade_path(resource) and use it.
Stars: ✭ 380 (+1166.67%)
Mutual labels:  rails, ruby-on-rails
Doctor
Doctor is a documentation server for your docs in github
Stars: ✭ 391 (+1203.33%)
Mutual labels:  rails, ruby-on-rails
Matestack Ui Core
Matestack enables you to create sophisticated, reactive UIs in pure Ruby, without touching JavaScript and HTML. You end up writing 50% less code while increasing productivity, maintainability and developer happiness.
Stars: ✭ 469 (+1463.33%)
Mutual labels:  rails, ruby-on-rails
Activeadmin addons
Extends ActiveAdmin to enable a set of great optional UX improving add-ons
Stars: ✭ 574 (+1813.33%)
Mutual labels:  activeadmin, rails
Rails performance
Monitor performance of you Rails applications
Stars: ✭ 345 (+1050%)
Mutual labels:  rails, ruby-on-rails
Sail
Sail is a lightweight Rails engine that brings an admin panel for managing configuration settings on a live Rails app
Stars: ✭ 484 (+1513.33%)
Mutual labels:  rails, ruby-on-rails
Arbre
An Object Oriented DOM Tree in Ruby
Stars: ✭ 610 (+1933.33%)
Mutual labels:  activeadmin, rails
Second level cache
Write Through and Read Through caching library inspired by CacheMoney and cache_fu, support ActiveRecord 4, 5 and 6.
Stars: ✭ 380 (+1166.67%)
Mutual labels:  rails, rails5
Learn Rails
An example Rails 5.1 app to accompany the "Learn Ruby on Rails" book.
Stars: ✭ 375 (+1150%)
Mutual labels:  rails, ruby-on-rails
Loaf
Manages and displays breadcrumb trails in Rails app - lean & mean.
Stars: ✭ 360 (+1100%)
Mutual labels:  rails, ruby-on-rails
Motion
Reactive frontend UI components for Rails in pure Ruby
Stars: ✭ 498 (+1560%)
Mutual labels:  rails, ruby-on-rails
Fae
CMS for Rails. For Reals.
Stars: ✭ 701 (+2236.67%)
Mutual labels:  rails, ruby-on-rails
Agoo
A High Performance HTTP Server for Ruby
Stars: ✭ 679 (+2163.33%)
Mutual labels:  rails, rails5
Railsgoat
A vulnerable version of Rails that follows the OWASP Top 10
Stars: ✭ 699 (+2230%)
Mutual labels:  rails, ruby-on-rails

ActiveAdmin Froala Editor Gem Version CircleCI

An Active Admin plugin to use Froala WYSIWYG editor (jQuery required, font-awesome required & included). For Froala license / pricing see Froala website.

Features:

  • permits to include an easy to use rich editor in Active Admin;
  • customizable options via data attributes in the form input;
  • plugins included, like images upload.

screenshot

Install

  • After installing Active Admin, add to your Gemfile: gem 'activeadmin_froala_editor' (and execute bundle)
  • Add at the end of your Active Admin styles (app/assets/stylesheets/active_admin.scss):
@import 'font-awesome/font-awesome';
@import 'activeadmin/froala_editor_input';
  • Add at the end of your Active Admin javascripts (app/assets/javascripts/active_admin.js):
//= require activeadmin/froala_editor/froala_editor.pkgd.min
//= require activeadmin/froala_editor_input
  • Use the input with as: :froala_editor in Active Admin model conf

Notes

  • To use this plugins with Active Admin 1.x please use the version 0.1.3
  • data-options: permits to set froala editor options directly from the form field (examples below) - see options list

Examples

Basic usage

# Active Admin article form conf:
  form do |f|
    f.inputs 'Article' do
      f.input :title
      f.input :description, as: :froala_editor
      f.input :published
    end
    f.actions
  end

Toolbar buttons configuration

# Form field
f.input :description, as: :froala_editor, input_html: { data: { options: { toolbarButtons: ['undo', 'redo', '|', 'bold', 'italic'] } } }

Froala upload plugin

# Upload method (to be included in the admin entity configuration)
member_action :upload, method: [:post] do
  success = resource.images.attach(params[:file_upload])
  result = success ? { link: url_for(resource.images.last) } : {}
  render json: result
end
# Form field
f.input :description, as: :froala_editor, input_html: { data: { options: { imageUploadParam: 'file_upload', imageUploadURL: upload_admin_post_path(resource.id), toolbarButtons: %w[bold italic underline | insertImage insertVideo insertFile] } } }

For the relevant files of an upload example see here. Consider that this is just a basic example: images are uploaded as soon as they are attached to the editor (regardless of the form submit), it shows the editor only for an existing record (because of the upload_admin_post_path) and it doesn't provide a way to remove images (just deleting them from the editor will not destroy them, you'll need to implement a purge logic for that).

Do you like it? Star it!

If 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.

Or consider offering me a coffee, it's a small thing but it is greatly appreciated: about me.

Contributors

  • Mattia Roccoberton: author
  • The good guys that opened issues and pull requests from time to time

License

The gem is available as open-source under the terms of the MIT.

For Froala editor License: see Froala website.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].