DEV Community

Discussion on: Preview my html code in iframe

Collapse
 
felipperegazio profile image
Felippe Regazio

Here is an example code of how you can accomplish that:
codepen.io/saigowthamr/pen/YjMwmV

Collapse
 
suryadevelope profile image
suryadevelope • Edited

Yes that's true but what if I had an image tag with src="/asserts/image.png" And ,image.png is in the form of base64 data in a variable in my javascript, now without changing the src of image tag into link or base64 or anything, how to show image tag (included in html) preview of ,image.png in iframe