GithubHelp home page GithubHelp logo

wakematta / summernote-ext-image-attributes-rails Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 12 KB

Gemify summernote-image-attributes for Rails >= 3.1

Home Page: https://github.com/DiemenDesign/summernote-image-attributes

License: MIT License

Ruby 97.14% Shell 2.86%
summernote summernote-plugins summernote-rails summernote-extension gem rails assets-pipeline summernote-image-attributes

summernote-ext-image-attributes-rails's Introduction

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

summernote-ext-image-attributes-rails's People

Contributors

wakematta avatar

Stargazers

 avatar

Watchers

 avatar

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.