You can get what the code has stored in an html element with innerHTML
. Is there any way to show what a user would get if they copied and pasted the content in the rendered version.
For example, if you had the div
<div> Hello World <img alt="imageText" src="image/source"></img></div>
I would want to get the string " Hello World imageText"