Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

NusaCustomControlType Interface

Implements mandatory members that allow you to bind the RichEdit control to the Nuance SpeechKit.

#Declaration

TypeScript
export interface NusaCustomControlType

#Properties

#newlineFormat Property

Specifies the escape sequence for the line break in the Rich Text Editor.

#Declaration

TypeScript
newlineFormat: string

#Property Value

Type Description
string

The string value that is equal to the LineBreak value.

#paragraphFormat Property

Specifies the escape sequence for the paragraph break in the Rich Text Editor.

#Declaration

TypeScript
paragraphFormat: string

#Property Value

Type Description
string

The string value that is equal to the ParagraphBreak value.

#Methods

#getSelection(element) Method

Returns the current selection range in the RichEdit control.

#Declaration

TypeScript
getSelection(element: HTMLElement): {
    start: number;
    length: number;
}

#Parameters

Name Type Description
element HTMLElement

An HTML element that represents the RichEdit control.

#Returns

Type Description
{length: number, start: number}

An object that contains the length and start position of the selection in the RichEdit control.

#getSelectionText(element) Method

Returns the selected text in the RichEdit control.

#Declaration

TypeScript
getSelectionText(
    element: HTMLElement
): string

#Parameters

Name Type Description
element HTMLElement

An HTML element that represents the RichEdit control.

#Returns

Type Description
string

The selected text.

#getText(element) Method

Returns the RichEdit control document’s textual representation.

#Declaration

TypeScript
getText(
    element: HTMLElement
): string

#Parameters

Name Type Description
element HTMLElement

An HTML element that represents the RichEdit control.

#Returns

Type Description
string

The document text.

#replaceText(element, text, fromPos, length) Method

Replaces the text in the RichEdit.

#Declaration

TypeScript
replaceText(
    element: HTMLElement,
    text: string,
    fromPos: number,
    length: number
): void

#Parameters

Name Type Description
element HTMLElement

An HTML element that represents the RichEdit control.

text string

The replacement text.

fromPos number

The start position of text to be replaced.

length number

The length of text to be replaced.

#setSelection(element, start, length) Method

Sets the selection in the the RichEdit control.

#Declaration

TypeScript
setSelection(
    element: HTMLElement,
    start: number,
    length: number
): void

#Parameters

Name Type Description
element HTMLElement

An HTML element that represents the RichEdit control.

start number

The start position of the selection.

length number

The selection length.