Back to Devexpress

NusaCustomControlType Interface

aspnetcore-js-devexpress-dot-richedit-f74f73e9.md

latest3.4 KB
Original Source

NusaCustomControlType Interface

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

Declaration

ts
export interface NusaCustomControlType

Properties

newlineFormat Property

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

Declaration

ts
newlineFormat: string

Property Value

TypeDescription
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

ts
paragraphFormat: string

Property Value

TypeDescription
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

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

Parameters

NameTypeDescription
elementHTMLElement

An HTML element that represents the RichEdit control.

|

Returns

TypeDescription
{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

ts
getSelectionText(
    element: HTMLElement
): string

Parameters

NameTypeDescription
elementHTMLElement

An HTML element that represents the RichEdit control.

|

Returns

TypeDescription
string

The selected text.

|

getText(element) Method

Returns the RichEdit control document’s textual representation.

Declaration

ts
getText(
    element: HTMLElement
): string

Parameters

NameTypeDescription
elementHTMLElement

An HTML element that represents the RichEdit control.

|

Returns

TypeDescription
string

The document text.

|

replaceText(element, text, fromPos, length) Method

Replaces the text in the RichEdit.

Declaration

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

Parameters

NameTypeDescription
elementHTMLElement

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

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

Parameters

NameTypeDescription
elementHTMLElement

An HTML element that represents the RichEdit control.

| | start | number |

The start position of the selection.

| | length | number |

The selection length.

|