All Projects → blocknotes → activeadmin_medium_editor

blocknotes / activeadmin_medium_editor

Licence: MIT License
Medium Editor for ActiveAdmin

Programming Languages

javascript
184084 projects - #8 most used programming language
ruby
36898 projects - #4 most used programming language
SCSS
7915 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to activeadmin medium editor

activeadmin active resource
Active Admin + Active Resource: to use a REST API in place of a local database as data source
Stars: ✭ 20 (-23.08%)
Mutual labels:  activeadmin, ruby-on-rails, activeadmin-plugin
Activeadmin froala editor
Froala WYSIWYG editor for ActiveAdmin
Stars: ✭ 30 (+15.38%)
Mutual labels:  activeadmin, ruby-on-rails
active admin role
Role based authorization with CanCanCan for Active Admin
Stars: ✭ 53 (+103.85%)
Mutual labels:  activeadmin, activeadmin-plugin
mysql2-lambda
Precompiled Mysql2 Gem for AWS Lambda
Stars: ✭ 19 (-26.92%)
Mutual labels:  ruby-on-rails
uploadcare-rails
Rails wrapper for Uploadcare
Stars: ✭ 48 (+84.62%)
Mutual labels:  ruby-on-rails
HelloWorld
A repository made for fun, aiming Hello World code in all programming languages.
Stars: ✭ 20 (-23.08%)
Mutual labels:  ruby-on-rails
serverless-rack
Serverless plugin to deploy Ruby Rack applications (Sinatra/Rails/Padrino/Cuba etc.) and bundle gems
Stars: ✭ 58 (+123.08%)
Mutual labels:  ruby-on-rails
LocalSupport
A directory of local support services and volunteer opportunities
Stars: ✭ 60 (+130.77%)
Mutual labels:  ruby-on-rails
katapult
Kickstart Rails development!
Stars: ✭ 21 (-19.23%)
Mutual labels:  ruby-on-rails
android-spyware
Rails c&c web application for spying Android devices
Stars: ✭ 124 (+376.92%)
Mutual labels:  ruby-on-rails
ruby-vips-lambda
AWS Lambda Layer for Ruby Libvips Gem
Stars: ✭ 34 (+30.77%)
Mutual labels:  ruby-on-rails
BlogArticle
My known and what i learning
Stars: ✭ 41 (+57.69%)
Mutual labels:  ruby-on-rails
porta
Red Hat 3scale API Management, Porta
Stars: ✭ 54 (+107.69%)
Mutual labels:  ruby-on-rails
Room-Meter
Room Meter is a hotel review site where users can create reviews in form of articles and vote on other reviews. It's built with the Ruby on Rails framework by following the MVP pattern
Stars: ✭ 12 (-53.85%)
Mutual labels:  ruby-on-rails
showhn.paperboy.digital
Autogenerated weekly newsletter of 'Show HackerNews' projects
Stars: ✭ 13 (-50%)
Mutual labels:  ruby-on-rails
examples
Examples of NuID's zero knowledge authentication and key management facilities in various languages and frameworks. Open an Issue or PR if you'd like to see your favorite tool here.
Stars: ✭ 42 (+61.54%)
Mutual labels:  ruby-on-rails
envkey-ruby
EnvKey's official Ruby client library
Stars: ✭ 24 (-7.69%)
Mutual labels:  ruby-on-rails
ror-capstone
Ruby on Rails app to track activities and assign a group to them
Stars: ✭ 15 (-42.31%)
Mutual labels:  ruby-on-rails
circulate
An operating system for lending libraries
Stars: ✭ 51 (+96.15%)
Mutual labels:  ruby-on-rails
rails5-docker-alpine
Lightweight Docker development environment for Rails using Alpine Linux
Stars: ✭ 71 (+173.08%)
Mutual labels:  ruby-on-rails

Active Admin Medium Editor

gem version Gem downloads linters specs

An Active Admin plugin to use medium-editor, a compact and clean WYSIWYG editor.

IMPORTANT NOTICE: while I like the Medium Editor idea of having floating buttons, it looks like that they are slow to release new stable versions. Some editor bugs are related to this problem unfortunately.

screenshot

Usage

  • After the installation, select some text in the editor
  • A pop-up menu is shown with the available buttons
  • Click on a button and the effect will be applied to the selected text

Install

  • After installing Active Admin, add to your Gemfile: gem 'activeadmin_medium_editor' (and execute bundle)
  • Add at the end of your Active Admin styles (app/assets/stylesheets/active_admin.scss):
@import 'activeadmin/medium_editor/medium_editor';
@import 'activeadmin/medium_editor_input';
@import 'activeadmin/medium_editor/themes/default'; // or another theme
  • Add at the end of your Active Admin javascripts (app/assets/javascripts/active_admin.js):
//= require activeadmin/medium_editor/medium_editor
//= require activeadmin/medium_editor_input
  • Use the input with as: :medium_editor in Active Admin model conf
  • data-options: permits to set medium-editor options directly - see options list (examples below)

Why 2 separated scripts/styles? In this way you can include a different version of medium-editor if you like

UPDATE FROM VERSION < 0.2.8: please change your app/assets/stylesheets/active_admin.scss using the new import lines above

Examples

Basic usage

# Active Admin post form conf:
  form do |f|
    f.inputs 'Post' do
      f.input :title
      f.input :description, as: :medium_editor, input_html: { data: { options: '{"spellcheck":false,"toolbar":{"buttons":["bold","italic","underline","anchor"]}}' } }
      f.input :published
    end
    f.actions
  end

Buttons configuration

toolbar = { buttons: %w[bold italic underline strikethrough subscript superscript anchor image quote pre orderedlist unorderedlist indent outdent justifyLeft justifyCenter justifyRight justifyFull h1 h2 h3 h4 h5 h6 removeFormat html] }
f.input :description, as: :medium_editor, input_html: { data: { options: { toolbar: toolbar } } }

For details about the buttons' effect please refer to medium-editor documentation.

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.

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