Question

the iframe's property is designMode = "on". when press some text in iframe with @ in Internet Explorer. it automatically converts it to a mailto: link.

e.g. ab@cd becomes mailto:ab@cd

how do I cancel this?

thanks

Was it helpful?

Solution

You can do this in IE 9 and later with document.execCommand() (MSDN):

document.execCommand("AutoUrlDetect", false, false);

Live demo: http://jsfiddle.net/3ELJD/1/

In earlier versions of IE, you'll have to remove the links yourself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top