A plugin for the Summernote WYSIWYG editor.
Adds a button to the image popover to edit title, alt, class and style attributes.
Include the following code after Summernote:
<script src="summernote-image-attributes.js"></script>
Currently available in English!
Finally, customize the Summernote image popover.
$(document).ready(function() {
$('#summernote').summernote({
popover: {
image: [
['custom', ['imageAttributes']],
['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']]
],
},
imageAttributes:{
icon:'<i class="fa fa-pencil"/>',
removeEmpty:false // true = remove attributes | false = leave empty if present
}
});
});