val (width, height) = getSizeParam(param)
val styleValue = getRawImageSizeStyleValue(width, height)
- ({
- img(src = "/assets/images/$url") {
- width?.let { attributes["data-width"] = "$it" }
- height?.let { attributes["data-height"] = "$it" }
- style = styleValue
- }
- })
+ if (url.endsWith(".svg"))
+ ({
+ iframe {
+ src = "/assets/images/$url"
+ width?.let { attributes["data-width"] = "$it" }
+ height?.let { attributes["data-height"] = "$it" }
+ style = styleValue
+ }
+ })
+ else
+ ({
+ img(src = "/assets/images/$url") {
+ width?.let { attributes["data-width"] = "$it" }
+ height?.let { attributes["data-height"] = "$it" }
+ style = styleValue
+ }
+ })
}),
MODEL(HtmlNotSupportedInRawViewTag("Unfortunately, raw view does not support interactive 3D model views")),
QUIZ(HtmlNotSupportedInRawViewTag("Unfortunately, raw view does not support interactive quizzes")),