Back to Devexpress

RichEditDocument Class

aspnetcore-js-devexpress-dot-richedit-3475df9d.md

latest7.0 KB
Original Source

RichEditDocument Class

Defines a document in the Rich Text Editor.

Declaration

ts
export class RichEditDocument extends RichEditDocumentBase

Inherited Members

fields

fonts

hyperlinks

interval

isProtected

length

lists

paragraphs

rangePermissions

sections

tables

checkProtectionPassword(password)

deleteText(interval)

getCharacterProperties(interval)

getDefaultCharacterProperties

getParagraphProperties(interval)

getText

insertColumnBreak(position)

insertLineBreak(position)

insertPageBreak(position)

insertParagraph(position)

insertPicture(position, base64)

insertSectionBreak(position, type)

insertText(position, text)

protect(password)

setCharacterProperties(interval, characterProperties)

setParagraphProperties(interval, paragraphProperties)

unprotect

Inheritance

RichEditDocumentBase RichEditDocument

Properties

bookmarks Property

Provide access to the document’s collection of bookmarks.

Declaration

ts
get bookmarks(): BookmarkCollectionBase

Property Value

TypeDescription
BookmarkCollectionBase

A collection of bookmarks.

|

Remarks

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

See Also

Common Use Cases: Bookmark

images Property

Provides access to the document’s images.

Declaration

ts
get images(): Images

Property Value

TypeDescription
Images

An object that allows you to manage document images.

|

modified Property

Specifies whether the document has unsaved changes.

Declaration

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

Property Value

TypeDescription
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

ts
get subDocuments(): SubDocumentCollectionBase

Property Value

TypeDescription
SubDocumentCollectionBase

A collection of sub-documents.

|

See Also

Document Model

Methods

setDefaultCharacterProperties(characterProperties) Method

Sets the document’s default character properties.

Declaration

ts
setDefaultCharacterProperties(
    characterProperties: ICharacterProperties
): void

Parameters

NameTypeDescription
characterPropertiesICharacterProperties

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

|

Remarks

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