Placing (draggable) images in Text Areas

There are ways to embed images in document, but in this post, if the image is available from a url, then you can easily reference such image from the internet or local network.

html
<div id='yourImage'>Loading...</div>

jscript
//this script will replace the inner html in the div. In this case, an <img> tag, which is not supported by default settings from the server directly on the html text area, will be pointing to an animated gif resource:

resource = "http://toxics.usgs.gov/photo_gallery/photos/geophysics/animation.gif"

//remove the last // to make the image draggable!
$("#yourImage").html($("<img>",{src:resource}))//.draggable()

No comments: