When i paste any text in any element with 'contentEditable' flag enabled, IE automatically finds the hyperlinks or email address and replaces them with
<a href="hyperlink">hyperlink</a>.
How can i disable this automatic url detection for elements(e.g. div, span etc.) with 'contentEditable' flag in IE or aleast get the actual text that was pasted in the div.
Best Regards,
Keshav
Unfortunately, there is no cross-version solution. In IE9 there is opportunity, allowing to disable automatic hyperlinking:
document.execCommand("AutoUrlDetect", false, false);
More information: http://msdn.microsoft.com, http://bytes.com
I don't think you can. You'll need catch the paste
event and set a brief timer that calls a function that removes links.
Edit 30 September 2012
IE 9 and above has the ability to switch this off. See Maxon's answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With