Commands D-Inl (JavaScript)

Command identifiers D-Inl for JavaScript.

  • DefaultParagraphSeparator
  • Delete
  • DirLTR
  • DirRTL
  • EditMode
  • EnableObjectResizing
  • ms-endUndoUnit
  • FontName
  • FontSize
  • ForeColor
  • FormatBlock
  • HiliteColor
  • Indent
  • InlineDirLTR
  • InlineDirRTL

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.)

Command DefaultParagraphSeparator
Minimum availability Internet 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.

Command Delete
Minimum availability Microsoft Internet Explorer 4.0

 

Call execCommand with the following parameters.

  • bUserInterface
    Set to false.

  • vValue
    Optional.

DirLTR

Not supported.

Command DirLTR

 

DirRTL

Not supported.

Command DirRTL

 

EditMode

Not supported.

Command EditMode

 

EnableObjectResizing

Enables or disables image resizing (grippers) in editable regions.

Command EnableObjectResizing
Minimum availability Microsoft Edge

 

Call execCommand with the following parameters.

  • bUserInterface
    Optional. Set to false.

  • vValue
    Variant of type Boolean indicating whether to enable object resizing

document.execCommand("EnableObjectResizing", false, false);

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.

Command ms-endUndoUnit
Minimum availability IE11

 

Call execCommand with the following parameters.

  • bUserInterface
    Optional. Set to false.

  • vValue
    Variant of type Boolean indicating whether to enable object resizing

  • vValue
    Optional.

document.execCommand("ms-endUndoUnit");

FontName

Sets or retrieves the font for the current selection.

Command FontName
Minimum availability Internet 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.

Command FontSize
Minimum availability Internet 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.

Command ForeColor
Minimum availability Internet 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.

Command FormatBlock
Minimum availability Internet 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.

Command HiliteColor

 

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.

Command Indent
Minimum availability Internet Explorer 4.0

 

Call execCommand with the following parameters.

  • bUserInterface
    Set to false.

  • vValue
    Optional.

InlineDirLTR

Not supported.

Command InlineDirLTR

 

InlineDirRTL

Not supported.

Command InlineDirRTL