InputEvent inputType property

Definition and Usage

inputType The property returns the type of change completed by the event.

Possible values:

  • "insertText"
  • "insertReplacementText"
  • "insertLineBreak"
  • "insertParagraph"
  • "insertOrderedList"
  • "insertUnorderedList"
  • "insertHorizontalRule"
  • "insertFromYank"
  • "insertFromDrop"
  • "insertFromPaste"
  • "insertTranspose"
  • "insertCompositionText"
  • "insertFromComposition"
  • "insertLink"
  • "deleteByComposition"
  • "deleteCompositionText"
  • "deleteWordBackward"
  • "deleteWordForward"
  • "deleteSoftLineBackward"
  • "deleteSoftLineForward"
  • "deleteEntireSoftLine"
  • "deleteHardLineBackward"
  • "deleteHardLineForward"
  • "deleteByDrag"
  • "deleteByCut"
  • "deleteByContent"
  • "deleteContentBackward"
  • "deleteContentForward"
  • "historyUndo"
  • "historyRedo"
  • "formatBold"
  • "formatItalic"
  • "formatUnderline"
  • "formatStrikethrough"
  • "formatSuperscript"
  • "formatSubscript"
  • "formatJustifyFull"
  • "formatJustifyCenter"
  • "formatJustifyRight"
  • "formatJustifyLeft"
  • "formatIndent"
  • "formatOutdent"
  • "formatRemove"
  • "formatSetBlockTextDirection"
  • "formatSetInlineTextDirection"
  • "formatBackColor"
  • "formatFontColor"
  • "formatFontName"

Example

Return the input type of the event:

function myFunction(event) {
  var x = event.inputType;
}

Try It Yourself

Syntax

event.inputType

Technical Details

Return Value: A string value indicating the type of action completed.

Browser Support

Properties Chrome IE Firefox Safari Opera
inputType 60 Not Supported Not Supported Supported 47

Related Pages

Document execCommand() Method