mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 19:37:12 +00:00
Load all frontend packages conditionally
This commit is contained in:
13
public/js/grocy_summernote.js
Normal file
13
public/js/grocy_summernote.js
Normal file
@@ -0,0 +1,13 @@
|
||||
$("textarea.wysiwyg-editor").summernote({
|
||||
minHeight: "300px",
|
||||
lang: __t("summernote_locale"),
|
||||
callbacks: {
|
||||
onImageLinkInsert: function(url)
|
||||
{
|
||||
// Summernote workaround: Make images responsive
|
||||
// By adding the "img-fluid" class to the img tag
|
||||
$img = $('<img>').attr({ src: url, class: "img-fluid" })
|
||||
$(this).summernote("insertNode", $img[0]);
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user