Summernote plugin for editing Image title, caption, alt attributes.
npm install summernote-image-attributes-editorAdds a button to the image popover to edit title, alt, caption and resize along with managing of Aspect Ratio.
* #### Include JS
Include the following code after Summernote:
``html`
* #### Using npm
If you are using npm, run this command
`html`
npm i summernote-image-attributes-editor --save
#### 2. Supported languages
Currently available in:
- English
Contributions are welcomed!
#### 3. Summernote options
Finally, customize the Summernote image popover.
`javascript``
$(document).ready(function() {
$('#summernote').summernote({
imageAttributes: {
icon: '',
figureClass: 'figureClass',
figcaptionClass: 'captionClass',
captionText: 'Caption Goes Here.',
manageAspectRatio: true // true = Lock the Image Width/Height, Default to true
},
lang: 'en-US',
popover: {
image: [
['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']],
['custom', ['imageAttributes']],
],
},
});
});
#### 4. Demo
- Demo
(Thanks to @asiffermann)
(Thanks to @DiemenDesign)