GithubHelp home page GithubHelp logo

dangerous / activeadmin_quill_editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blocknotes/activeadmin_quill_editor

0.0 2.0 1.0 158 KB

Quill Rich Text Editor for ActiveAdmin

License: MIT License

Ruby 0.21% JavaScript 92.30% CSS 7.49%

activeadmin_quill_editor's Introduction

ActiveAdmin Quill Editor Gem Version

An Active Admin plugin to use Quill Rich Text Editor

screenshot

Install

  • Update your Gemfile: gem 'activeadmin_quill_editor' (and execute bundle)
  • Add at the end of your ActiveAdmin styles (app/assets/stylesheets/active_admin.scss):
@import 'activeadmin/quill_editor_input';
  • Add at the end of your ActiveAdmin javascripts (app/assets/javascripts/active_admin.js):
//= require activeadmin/quill_editor/quill
//= require activeadmin/quill_editor_input
  • Use the input with as: :quill_editor in Active Admin model conf

Why 2 separated scripts? In this way you can include a different version of quill editor if you like.

Options

data-options: permits to set quill editor options directly - see options list

Examples

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

Toolbar buttons configuration:

f.input :description, as: :quill_editor, input_html: {data: {options: {modules: {toolbar: [['bold', 'italic', 'underline'], ['link']]}, placeholder: 'Type something...', theme: 'snow'}}}

Notes

  • Upload functions (Images, Documents, Files, etc.) are not implemented yet

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.

Take a look at other ActiveAdmin components that I made if you are curious.

Contributors

License

MIT

activeadmin_quill_editor's People

Contributors

blocknotes avatar dangerous avatar louim avatar

Watchers

 avatar  avatar

Forkers

aceredu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.