summernote-image-title

0.2.3 • Public • Published

summernote-image-title

A plugin for the Summernote WYSIWYG editor.

Adds a button to the image popover to edit title and alt attributes.

Installation

1. Include JS

This plugin is available on NPM or Bower:

npm install summernote-image-title --save
bower install summernote-image-title --save

Include the following code after Summernote:

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

2. Supported languages

Currently available in:

Contributions are welcomed!

3. Summernote options

Finally, customize the Summernote image popover. You can choose if you want to edit the alt attribute specifically or not with the option specificAltField:

$(document).ready(function() {
    $('#summernote').summernote({
        imageTitle: {
          specificAltField: true,
        },
        lang: 'fr-FR',
        popover: {
            image: [
                ['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
                ['float', ['floatLeft', 'floatRight', 'floatNone']],
                ['remove', ['removeMedia']],
                ['custom', ['imageTitle']],
            ],
        },
    });
});

Example

You can see working pens here:

Package Sidebar

Install

npm i summernote-image-title

Weekly Downloads

36

Version

0.2.3

License

MIT

Unpacked Size

17.7 kB

Total Files

7

Last publish

Collaborators

  • asiffermann