Commands Ins-Ins (JavaScript)

Command identifiers Ins-Ins for JavaScript.

InsertButton

Overwrites a button control on the text selection.

CommandInsertButton

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the button control.

InsertFieldset

Overwrites a box on the text selection.

CommandInsertFieldset

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the box. May be set to null or omitted.

InsertHorizontalRule

Overwrites a horizontal line on the text selection.

CommandInsertHorizontalRule

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the horizontal line. May be set to null or omitted.

InsertIFrame

Overwrites an inline frame on the text selection.

CommandInsertIFrame

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the inline frame. May be set to null or omitted.

InsertImage

Overwrites an image on the text selection.

CommandInsertImage

 

Call execCommand with the following parameters.

bUserInterface

Optional. This command displays a dialogue box if the bUserInterface argument of execCommand is set to true or omitted. It does not display a dialogue box if the argument is set to false or null and the vValue parameter is present (even if it's null).

vValue

Optional. Variant of type String that specifies the path and file name of the image to insert. If the command displays a dialogue box, this parameter is ignored.

If no path is provided for the image file, the path will default to the location of the current document.

Although this command is available for Windows Store app using JavaScript, it is recommended that you use the image picker to allow users to select an image.

InsertInputButton

Overwrites a button control on the text selection.

CommandInsertInputButton

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the button control. May be set to null or omitted.

InsertInputCheckbox

Overwrites a check box control on the text selection.

CommandInsertInputCheckbox

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the check box control. May be set to null or omitted.

InsertInputFileUpload

Overwrites a file upload control on the text selection.

CommandInsertInputFileUpload

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the file upload control. May be set to null or omitted.

InsertInputHidden

Inserts a hidden control on the text selection.

CommandInsertInputHidden

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the hidden control. May be set to null or omitted.

InsertInputImage

Overwrites an image control on the text selection.

CommandInsertInputImage

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the image control. May be set to null or omitted.

InsertInputPassword

Overwrites a password control on the text selection.

CommandInsertInputPassword

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the password control. May be set to null or omitted.

InsertInputRadio

Overwrites a radio control on the text selection.

CommandInsertInputRadio

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the radio control. May be set to null or omitted.

InsertInputReset

Overwrites a reset control on the text selection.

CommandInsertInputReset

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the reset control. May be set to null or omitted.

InsertInputSubmit

Overwrites a submit control on the text selection.

CommandInsertInputSubmit

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the submit control. May be set to null or omitted.

InsertInputText

Overwrites a text control on the text selection.

CommandInsertInputText

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the text control. May be set to null or omitted.

InsertMarquee

Overwrites an empty marquee on the text selection.

CommandInsertMarquee

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the marquee. May be set to null or omitted.

InsertOrderedList

Toggles the text selection between an ordered list and a normal format block.

CommandInsertOrderedList

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the ordered list. May be set to null or omitted.

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("InsertOrderedList", false, 'listId'); 

InsertParagraph

Overwrites a line break on the text selection.

CommandInsertParagraph

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the paragraph. May be set to null or omitted.

InsertSelectDropdown

Overwrites a drop-down selection control on the text selection.

CommandInsertSelectDropdown

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the drop-down selection control. May be set to null or omitted.

InsertSelectListbox

Overwrites a list box selection control on the text selection.

CommandInsertSelectListbox

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the list box selection control. May be set to null or omitted.

InsertTextArea

Overwrites a multiline text input control on the text selection.

CommandInsertTextArea

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the text input control. May be set to null or omitted.

InsertUnorderedList

Converts the text selection into an ordered list.

CommandInsertUnorderedList

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional. Variant of type String that specifies an id attribute for the unordered list. May be set to null or omitted.

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'); 

 

 

Show:
© 2014 Microsoft