No commit activity in last 3 years
No release in over 3 years
This gem packages the extencion summernote-ext-image-attributes of Summernote editor for Rails' assets pipeline
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 3.1
 Project Readme

summernote-ext-image-attributes-rails

The gemification of the summernote extension summernote-image-attributes for Rails >= 3.1.

Demo

Also, we have a live demo (press the image inside of the editor).

Installation

Add the following gems to your application's Gemfile:

gem 'bootstrap-sass'   # required
gem 'summernote-rails' # required
gem 'summernote-ext-image-attributes-rails', '~> 0.8.10'

And then execute on the terminal:

bundle install

Usage

JavaScript

In app/assets/javascripts/application.js, you should add in this order:

//= require bootstrap
//= require summernote
//= require summernote-ext-image-attributes

CoffeeScript

In app/assets/javascripts/application.coffee, you should add in this order:

#= require bootstrap
#= require summernote
#= require summernote-ext-image-attributes

Customization

$('[data-provider="summernote"]').summernote({
  popover: {
    image: [
      ['custom', ['imageAttributes']],
      ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
      ['float', ['floatLeft', 'floatRight', 'floatNone']],
      ['remove', ['removeMedia']]
    ],
  },
  lang: 'en-US', // Change to your chosen language
  imageAttributes: {
    icon: '<i class="note-icon-pencil"/>',
    removeEmpty: false, // true = remove attributes | false = leave empty if present
    disableUpload: false // true = don't display Upload Options | Display Upload Options
	}
});

More information here.

Versioning

Major Minor Patch Current
is the major of summernote is the minor of summernote is the patch of summernote is the vesion of this extension

Example:

The compatible versions of this gem with summernote v0.8.10 are:

  • summernote-ext-image-attributes-rails v0.8.10.X

License

MIT