InsertUnorderedList Command

Converts the text selection into an ordered list.

Scripting Information

Command InsertUnorderedList
User interface None. Set bUserInterface to false or omit. 
execCommand vValue Optional. String that specifies an id attribute for the unordered list. May be set to null or omitted.
Applies to execCommandqueryCommandEnabledqueryCommandIndetermqueryCommandStatequeryCommandSupportedqueryCommandValue.

Remarks

If the previous format block is already an ordered list, this command identifier will append the current format block to that previous ordered list. If the text selection contains named objects, they are replaced by the list.

The following example converts the paragraphs of a document into a list:

var tr = document.body.createTextRange();
tr.execCommand("InsertUnorderedList", false, 'listId'); 

Minimum Availability

Internet Explorer 4.0 and later.

See Also

createTextRange