p {
+"Creates an embedded image:"
br
- unsafe {
- raw("<script>window.appendImageThumb('https://i.ibb.co/Lns12z1/robert-sparr.png', '${getImageSizeStyleValue(256, 256)}');</script>")
+ img(src = "https://i.ibb.co/Lns12z1/robert-sparr.png") {
+ style = getImageSizeStyleValue(256, 256)
}
br
+"The tag param controls the width and height, much like a table cell. The size unit is viewport-responsive and has no correlation with pixels."
p {
+"A similar tag is used to embed images that are hosted on Imgur, e.g. the image at https://i.imgur.com/dd0mmQ1.png"
br
- unsafe {
- raw("<script>window.appendImageThumb('https://i.imgur.com/dd0mmQ1.png', '${getImageSizeStyleValue(250, 323)}');</script>")
+ img(src = "https://i.imgur.com/dd0mmQ1.png") {
+ style = getImageSizeStyleValue(250, 323)
}
br
+"can be embedded using [imgur=250x323]dd0mmQ1.png[/imgur]"
val imageUrl = sanitizeExtLink(content)
val (width, height) = getSizeParam(tagParam)
- "<script>window.appendImageThumb('https://i.imgur.com/$imageUrl', '${getImageSizeStyleValue(width, height)}');</script>"
+ "<img src='https://i.imgur.com/$imageUrl'${getImageSizeAttributes(width, height)}/>"
}
),
IMGBB(
val imageUrl = sanitizeExtLink(content)
val (width, height) = getSizeParam(tagParam)
- "<script>window.appendImageThumb('https://i.ibb.co/$imageUrl', '${getImageSizeStyleValue(width, height)}');</script>"
+ "<img src='https://i.ibb.co/$imageUrl'${getImageSizeAttributes(width, height)}/>"
}
),