Invox Dictation SDK Version:

Writer Functions


Functions related to text writing operations. These functions interact with the configured TextWriter. Pass an editorInstance to operate on a specific editor; the SDK temporarily switches to that target and then restores the configured writer target.

Write

FunctionDescriptionParametersReturns
INVOX.Write(text, editorInstance)Writes the given text at the current caret position.String, Objectvoid or Promise
INVOX.Write("Hello, world!", editorInstance);

AppendText

FunctionDescriptionParametersReturns
INVOX.AppendText(text, editorInstance)Appends text at the end of the editor content.String, Objectvoid or Promise
INVOX.AppendText("Additional text.", editorInstance);

PrependText

FunctionDescriptionParametersReturns
INVOX.PrependText(text, editorInstance)Prepends text at the beginning of the editor content.String, Objectvoid or Promise
INVOX.PrependText("Prepended text. ", editorInstance);

ClearText

FunctionDescriptionParametersReturns
INVOX.ClearText(editorInstance)Clears all content from the editor.Objectvoid or Promise
INVOX.ClearText(editorInstance);

GetText

FunctionDescriptionParametersReturns
INVOX.GetText(editorInstance)Returns the full plain text from the editor.ObjectString or Promise<String>
const text = INVOX.GetText(editorInstance);

SetSelection

FunctionDescriptionParametersReturns
INVOX.SetSelection(range, editorInstance)Sets the current selection range in the editor.INVOX.Range, Objectvoid or Promise
INVOX.SetSelection(new INVOX.Range(0, 5), editorInstance);

SetTextWriter

FunctionDescriptionParametersReturns
INVOX.SetTextWriter(writer)Sets the TextWriter implementation to use.Objectvoid
INVOX.SetTextWriter(INVOX.TextAreaTextWriter);

SetWriterTarget

FunctionDescriptionParametersReturns
INVOX.SetWriterTarget(target)Sets the current editor element as writing target.Elementvoid
INVOX.SetWriterTarget(document.getElementById("my-textarea"));

GetWriterTarget

FunctionDescriptionParametersReturns
INVOX.GetWriterTarget()Returns the current writing target element.—Element
const target = INVOX.GetWriterTarget();