Hi,
When using embedded content for the src of the image (like base64 or svg) where, in most cases, single quotes are used within the attribute, rendering the answer for the user results in invalid html.
Changing:
var image = hasTagImage ? "<img src='" + this.referenceTag.domElement.getAttribute("cf-image") + "'/>" : "";
to
var image = hasTagImage ? "<img src=\"" + this.referenceTag.domElement.getAttribute("cf-image") + "\"/>" : "";
fixes this.
I have also experimented with image sizes and implemented two additional properties, cf-image-width and cf-image-height. When using radios with longer texts and images the images would scale enormously as the css sets its size to 100%.
if (hasTagImage) {
var sizeHeight = this.referenceTag.domElement.getAttribute("cf-image-width");
var sizeWidth = this.referenceTag.domElement.getAttribute("cf-image-height");
image = "<img src=\"" + this.referenceTag.domElement.getAttribute("cf-image") + "\"";
image += sizeHeight ? " height=\"" + sizeHeight + "\"" : "";
image += sizeWidth ? " width=\"" + sizeWidth + "\"" : "";
image += "/>";
}
mzZzl,
JamBo
Hi,
When using embedded content for the src of the image (like base64 or svg) where, in most cases, single quotes are used within the attribute, rendering the answer for the user results in invalid html.
Changing:
to
fixes this.
I have also experimented with image sizes and implemented two additional properties, cf-image-width and cf-image-height. When using radios with longer texts and images the images would scale enormously as the css sets its size to 100%.
mzZzl,
JamBo