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

RichEditDocument Class

Defines a document in the Rich Text Editor.

#Declaration

TypeScript
export class RichEditDocument extends RichEditDocumentBase

#Inheritance

RichEditDocumentBase
RichEditDocument

#Properties

#bookmarks Property

Provide access to the document’s collection of bookmarks.

#Declaration

TypeScript
get bookmarks(): BookmarkCollectionBase

#Property Value

Type Description
BookmarkCollectionBase

A collection of bookmarks.

#Remarks

var bookmark = richEdit.document.bookmarks.find('bookmarkName')[0];
if (bookmark)
    bookmark.goTo();
See Also

#images Property

Provides access to the document’s images.

#Declaration

TypeScript
get images(): Images

#Property Value

Type Description
Images

An object that allows you to manage document images.

#modified Property

Specifies whether the document has unsaved changes.

#Declaration

TypeScript
get modified(): boolean
set modified(value: boolean)

#Property Value

Type Description
boolean

true if the document has unsaved changes; otherwise, false.

#Remarks

It is not possible to set the modified property to true to mark the document as modified. You can use the hasUnsavedChanges property to specify the Save button availability.

#subDocuments Property

Provide access to the document’s collection of sub-documents.

#Declaration

TypeScript
get subDocuments(): SubDocumentCollectionBase

#Property Value

Type Description
SubDocumentCollectionBase

A collection of sub-documents.

See Also

#Methods

#setDefaultCharacterProperties(characterProperties) Method

Sets the document’s default character properties.

#Declaration

TypeScript
setDefaultCharacterProperties(
    characterProperties: ICharacterProperties
): void

#Parameters

Name Type Description
characterProperties ICharacterProperties

A CharacterProperties object that implements the ICharacterProperties interface and contains character properties.

#Remarks

const charProps = richEdit.document.getDefaultCharacterProperties();
charProps.fontName = "Segoe UI";
richEdit.document.setDefaultCharacterProperties(charProps);