Commands D-Inl (JavaScript)

Command identifiers D-Inl for JavaScript.

DefaultParagraphSeparator

Sets the default element (p or div) to use when creating new paragraph blocks in plain text (for example, when pressing Enter).

Once a paragraph separator has been inserted into an editable area, calling DefaultParagraphSeparator will no longer have any effect on that region. (This command does not enable toggling between p and div separators within the same editable region.)

CommandDefaultParagraphSeparator
Minimum availabilityInternet Explorer 11

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Required. Variant of type String that specifies the default element to use for creating new paragraphs. Must be either "p" or "div".


document.execCommand("DefaultParagraphSeparator", false, "div");

Delete

Deletes the current selection.

CommandDelete
Minimum availabilityMicrosoft Internet Explorer 4.0

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional.

DirLTR

Not supported.

CommandDirLTR

 

DirRTL

Not supported.

CommandDirRTL

 

EditMode

Not supported.

CommandEditMode

 

ms-endUndoUnit

Ends an undo unit. Any DOM changes between ms-beginUndoUnit and ms-endUndoUnit (including any changes from script) are collected into an undo unit and undone and redone as if they were a single command.

Commandms-endUndoUnit
Minimum availabilityIE11

 

Call execCommand with the following parameters.

bUserInterface

Optional. Set to false.

vValue

Optional.


document.execCommand("ms-endUndoUnit");

FontName

Sets or retrieves the font for the current selection.

CommandFontName
Minimum availabilityInternet Explorer 4.0

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Required. Variant of type String that specifies a font name or font list, as described by the font attribute.

The HTML generated by this command may vary depending on the version of Windows Internet Explorer.

FontSize

Sets or retrieves the font size for the current selection.

CommandFontSize
Minimum availabilityInternet Explorer 4.0

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Required. Variant of type Integer or String that specifies the font size. This must be a value between 1 and 7, inclusive.

The HTML generated by this command may vary depending on the version of Internet Explorer.

ForeColor

Sets or retrieves the foreground (text) color of the current selection.

CommandForeColor
Minimum availabilityInternet Explorer 4.0

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Required. Variant of type String that specifies a color name or a six-digit hexadecimal RGB value, with or without a leading hash mark, as defined in the Color Table.

The HTML generated by this command may vary depending on the version of Internet Explorer.

FormatBlock

Sets the current block format tag.

CommandFormatBlock
Minimum availabilityInternet Explorer 4.0

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Required. Variant of type String that specifies a valid block format tag.

The available block formatting strings may change in subsequent releases of the MSHTML component. Call Exec with the IDM_GETBLOCKFMTS Command ID to obtain the current list of available block formatting commands that can be passed with the FormatBlock Command ID.

HiliteColor

Sets or retrieves the background color of the current selection.

CommandHiliteColor

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Required. Variant of type String that specifies a color name or a six-digit hexadecimal RGB value, with or without a leading hash mark, as defined in the Color Table.

Note  HiliteColor provides the same functionality as BackColor.

Indent

Increases the indent of the selected text by one indentation increment.

CommandIndent
Minimum availabilityInternet Explorer 4.0

 

Call execCommand with the following parameters.

bUserInterface

Set to false.

vValue

Optional.

InlineDirLTR

Not supported.

CommandInlineDirLTR

 

InlineDirRTL

Not supported.

CommandInlineDirRTL

 

 

 

Show:
© 2014 Microsoft