Test designMode + queryCommandState + image element selection. Try to select the image below, with a mouse click.

The piano room