Giter Site home page Giter Site logo

summernote-image-attributes's Introduction

summernote-image-attributes

A plugin for the Summernote WYSIWYG editor.

Adds two buttons to the image popover to edit title, alt, class and style attributes, and Links with relevant Attributes (Thanks to minidc). Now includes role attribute editing.

It also optionally adds a dropdown to choose from Bootstrap image shapes (Thanks to MarcosBL).

summernote-image-attributes-popover

summernote-image-attributes-modal

Installation

1. Include JS

Include the following code after Summernote:

<script src="summernote-image-attributes.js"></script>

2. Supported languages

Currently available in English, Spanish, French, Chinese (Traditional), Italian, German and Turkish!

3. Summernote options

Finally, customize the Summernote image popover.

$(document).ready(function() {
    $('#summernote').summernote({
        popover: {
            image: [
                ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
                ['float', ['floatLeft', 'floatRight', 'floatNone']],
                ['custom', ['imageAttributes', 'imageShape']],
                ['remove', ['removeMedia']]
            ],
        },
        lang: 'en-US'
/* Do NOT set the below options when Calling Summernote, we're working on why these are throwing an error that causes the plugin not to work. You can however set them in the script itself.
        imageAttributes:{
            imageDialogLayout:'default', // default|horizontal
            icon:'<i class="note-icon-pencil"/>',
            removeEmpty:false // true = remove attributes | false = leave empty if present
        },
        imageShape: {
            icon: '<i class="note-icon-picture"/>'
        }
*/
    });
});

4. Check out our other Summernote Plugins

  • Summernote Video Attributes
    • Insert Video's from various Streaming Services, with Options Editing.
  • Summernote Cleaner
    • Clean Pasted and Existing Markup, mainly for cleaning text from Office Document software.
  • Summernote Save Button
    • Add a Save Button to the Toolbar when Summernote is inside a form with a Textarea to easily save your document.
  • Summernote SEO
    • Adds a Dropdown to the Toolbar that allows extracting selected text and inserts it into input elements for editing.

Contributors

  • Add links to Image
  • French Translation
  • Chinese (Traditional) Translation
  • Italian Translation
  • German Translation and Horizontal Dialog Layout
  • Turkish Translation

summernote-image-attributes's People

Contributors

yumewang avatar asiffermann avatar marcosbl avatar lqez avatar ninidc avatar b-alidra avatar horkenw avatar paolodadda avatar

Watchers

James Cloos avatar Deepak 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.