Skip to main content
A newer version of this page is available. .

Interval Class

Contains settings for a text interval.

Declaration

export class Interval implements IInterval

Remarks

function onDocumentLoaded(s, e) {
    s.document.insertText(0, 'Dear Mr Stanley,');
    s.document.insertParagraph(s.document.length);
    var startPosition = s.document.length;
    s.document.insertParagraph(startPosition);
    s.document.insertText(startPosition, '[Type your text here]');
    s.selection.setSelection(new DevExpress.RichEdit.Interval(startPosition, s.document.length - startPosition));
    s.focus();
}

For a full example, see Ribbon Customization demo.

Implements

constructor(start, length)

Creates a new instance of the constructor(start, length) class.

Declaration

constructor(
    start: number,
    length: number
)

Parameters

Name Type Description
start number

The interval’s start position.

length number

The interval length.

Properties

end Property

Gets the interval’s end position in the document.

Declaration

readonly end: number

Property Value

Type Description
number

The end position.

length Property

Specifies the number of character positions in the interval.

Declaration

length: number

Property Value

Type Description
number

The interval length.

start Property

Specifies the interval’s start position in the document.

Declaration

start: number

Property Value

Type Description
number

The start position.