IDM_AUTOURLDETECT_MODE Command ID
Turns automatic URL detection on and off.
C++ Information
Command group CGID_MSHTML (defined in mshtmhst.h) Symbolic constant IDM_AUTOURLDETECT_MODE User interface None. Set nCmdExecOpt to OLECMDEXECOPT_DONTPROMPTUSER. IOleCommandTarget::Exec parameters pvaIn VARIANT of type VT_BOOL specifying whether automatic URL detection is to be on or off.pvaOut Set to NULL.Header file mshtmcid.h Applies to IHTMLDocument2::execCommand, IHTMLDocument2::queryCommandEnabled, IHTMLDocument2::queryCommandIndeterm, IHTMLDocument2::queryCommandState, IHTMLDocument2::queryCommandSupported, IHTMLDocument2::queryCommandValue, IOleCommandTarget::Exec, IOleCommandTarget::QueryStatus.
Remarks
By default, automatic URL detection is on when the MSHTML Editor is activated. The editor will automatically create a hyperlink for any text that is formatted as a URL.
Minimum Availability
Internet Explorer 5.5 and later.
See Also
Using the MSHTML Editor's Extra Features
Not applicable to execCommand
In IE8 and below, you cannot use execCommand from JavaScript to disable automatic hyperlinking, because execCommand takes a string command identifier, and no string is mapped to IDM_AUTOURLDETECT_MODE.
A new command constant AutoUrlDetect is supported in IE9, allowing script to disable automatic hyperlinking as follows:
document.execCommand("AutoUrlDetect", false, false)
- 9/16/2009
- EricLaw [MSFT]
- 8/9/2011
- EricLaw [MSFT]