Commands Ins-Ins (JavaScript)
Command identifiers Ins-Ins for JavaScript.
- InsertButton
- InsertFieldset
- InsertHorizontalRule
- InsertHTML
- InsertIFrame
- InsertImage
- InsertInputButton
- InsertInputCheckbox
- InsertInputFileUpload
- InsertInputHidden
- InsertInputImage
- InsertInputPassword
- InsertInputRadio
- InsertInputReset
- InsertInputSubmit
- InsertInputText
- InsertMarquee
- InsertOrderedList
- InsertParagraph
- InsertSelectDropdown
- InsertSelectListbox
- InsertText
- InsertTextArea
- InsertUnorderedList
InsertButton
Overwrites a button control on the text selection.
Command | InsertButton |
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.
Command | InsertFieldset |
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.
Command | InsertHorizontalRule |
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.
InsertHTML
Inserts HTML at the insertion point, overwriting any text selection.
Command | InsertHTML |
Call execCommand with the following parameters.
bUserInterface
Set to false.vValue
Required. Variant of type String that contains valid HTML.
InsertIFrame
Overwrites an inline frame on the text selection.
Command | InsertIFrame |
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.
Command | InsertImage |
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.
Command | InsertInputButton |
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.
Command | InsertInputCheckbox |
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.
Command | InsertInputFileUpload |
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.
Command | InsertInputHidden |
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.
Command | InsertInputImage |
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.
Command | InsertInputPassword |
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.
Command | InsertInputRadio |
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.
Command | InsertInputReset |
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.
Command | InsertInputSubmit |
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.
Command | InsertInputText |
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.
Command | InsertMarquee |
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.
Command | InsertOrderedList |
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.
Command | InsertParagraph |
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.
Command | InsertSelectDropdown |
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.
Command | InsertSelectListbox |
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.
InsertText
Inserts the given text string at the current location (similar to PasteText behavior).
Command | InsertText |
Minimum availability | Microsoft Edge |
Call execCommand with the following parameters.
bUserInterface
Set to false.vValue
Variant of type String with the given text to insert.
document.execCommand("InsertText", false, "the text to insert");
InsertTextArea
Overwrites a multiline text input control on the text selection.
Command | InsertTextArea |
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.
Command | InsertUnorderedList |
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');