Image with hyperlink
ankeshp03 opened this issue · 3 comments
ankeshp03 commented
Can we have a feature to add hyperlink to image, if possible?
It is supported by pdfmake as well.
You can find the working code for pdfmake below.
var dd = {
"content": [
{
"nodeName": "IMG",
"image": "img_ref_0",
"link": "https://picsum.photos/seed/picsum/200",
"style": [
"html-img"
]
}
],
"images": {
"img_ref_0": "https://picsum.photos/seed/picsum/200"
},
"styles": {}
}
}
It would be a great help if this feature is made available.
Aymkdn commented
I'll have a look tomorrow morning. It's already the evening here and I'm off the computer 😉
ankeshp03 commented
Sure 🙂
Aymkdn commented
I published the v2.4.15 where an image inside a link is now getting the link
property.
So, the HTML should look like the below to have a link
property on the image:
<a href="https://picsum.photos/seed/picsum/200"><img src="https://picsum.photos/seed/picsum/200"></a>