Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for TextUpdateEvent.
Developer library 6
TextUpdateEvent
EditContext API The **`TextUpdateEvent`** interface is a [DOM event](/docs/Web/API/Event) that represents a text or selection update in an editable text region that's attached to an EditContext instance. This interface inherits properties from Event. ## Constructor - TextUpdateEvent() - : Creates a new `TextUpdateEvent` object. ## Instance properties - TextUpdateEvent.updateRangeStart - : Returns the i
TextUpdateEvent: updateRangeStart property
EditContext API The **`TextUpdateEvent.updateRangeStart`** read-only property indicates the start position of the text range that is being replaced in the EditContext object. ## Value A Number. ## Examples ### Using `textupdate` to display the inserted text and location ```html <div id="editor"></div> ``` ```js const editorEl = document.getElementById("editor"); const editContext = new EditContext(); editorEl.
TextUpdateEvent: selectionEnd property
EditContext API The **`TextUpdateEvent.selectionEnd`** read-only property indicates the position of the end of the selection (or caret) within the text content of the editable region attached to the EditContext object. ## Value A Number. ## Examples ### Using `textupdate` to render the edited text and user selection This example shows how to use the `selectionEnd` property to render the selected text within a t
TextUpdateEvent: updateRangeEnd property
EditContext API The **`TextUpdateEvent.updateRangeEnd`** read-only property indicates the end position of the text range that is being replaced in the EditContext object. ## Value A Number. ## Examples ### Using `textupdate` to display the inserted text and location ```html <div id="editor"></div> ``` ```js const editorEl = document.getElementById("editor"); const editContext = new EditContext(); editorEl.edit
TextUpdateEvent: TextUpdateEvent() constructor
TextUpdateEvent API The **`TextUpdateEvent()`** constructor returns a new TextUpdateEvent object. ## Syntax ```js-nolint new TextUpdateEvent(type) new TextUpdateEvent(type, options) ``` ### Parameters - `type` - : A string representing the type of the event. Possible values: `"textupdate"`. - `options` - : An optional object with the following properties: - `updateRangeStart` - : A number represen
TextUpdateEvent: text property
EditContext API The **`TextUpdateEvent.text`** read-only property contains the text that was inserted within the updated range of an EditContext's `textupdate` event. ## Value A String that contains the text that replaces the text contained between the updateRangeStart and updateRangeEnd indexes. ## Examples ### Using `textupdate` to display the inserted text and location ```html <div id="editor"></div> ``` ``