script for handling iframes like rich text editor