Delete at compositionend Demo using Input Events

Type into the contenteditable element (ce1) below. If you use an input method editor to compose text, the composition will be deleted when committed.

A table of relevant events, most recent on top, appears below. Note that curly braces and square brackets indicate the start and end of the range reported by the beforeinput event. Curly braces are used to mark a start or end position inside a text node; square brackets indicate a position inside an element:

event target inputType key code data ce1 text