I want to add a class (class="img-responsive") in the images which i add with the editor.
actually i get this code after i saved my text:
<img src="LINK" style="width: 628px; height: 470.7191413237925px;">
in the summernote.js i found this code:
/**
* create `<image>` from url string
*
* @param {String} sUrl
* @return {Promise} - then: $image
*/
var createImage = function (sUrl) {
return $.Deferred(function (deferred) {
$('<img>').one('load', function () {
deferred.resolve($(this));
}).one('error abort', function () {
deferred.reject($(this));
}).css({
display: 'none'
}).appendTo(document.body).attr('src', sUrl);
}).promise();
};
return {
readFileAsDataURL: readFileAsDataURL,
createImage: createImage
};
})();
i dont know if that is the right code to add a class, and also i dont know how and where to add class="img-responsive"