limit img max-width

This commit is contained in:
xiaomlove
2021-03-19 11:07:29 +08:00
parent 209483fc91
commit d5258d5035
2 changed files with 7 additions and 6 deletions

View File

@@ -221,7 +221,7 @@ function formatCode($text) {
}
function formatImg($src, $enableImageResizer, $image_max_width, $image_max_height, $imgId = "") {
return addTempCode("<img id=\"$imgId\" alt=\"image\" src=\"$src\"" .($enableImageResizer ? " onload=\"Scale(this,$image_max_width,$image_max_height);\" onclick=\"Preview(this);\"" : "") . " />");
return addTempCode("<img style=\"max-width: 100%\" id=\"$imgId\" alt=\"image\" src=\"$src\"" .($enableImageResizer ? " onload=\"Scale(this,$image_max_width,$image_max_height);\" onclick=\"Preview(this);\"" : "") . " />");
}
function formatFlash($src, $width, $height) {