aspnet-117415-components-rich-text-editor-document-document-model-sub-document.md
The document’s entire content is divided into individual parts - sub-documents. A list of all sub-documents is stored within the Document Model. A sub-document to which the cursor position (or intervals of the current selection) belongs is the active sub-document. The available client-side API commands work with the active sub-document.
The following sub-document types are available.
Main Sub-Document
Header or Footer
Text box
A sub-document provides access to the current customization information of its main structural elements listed below. These elements are parts of the sub-document’s Text Buffer.
To access sub-documents on the client, use the following properties in the notation described below:
clientRichEditName.document.member_name
| Member Name | Link | Description |
|---|---|---|
| subDocuments | RichEditDocument.subDocuments | Returns the document’s sub-documents. |
| mainSubDocument | RichEditDocument.mainSubDocument | Returns the main sub-document. |
| activeSubDocument | RichEditDocument.activeSubDocument | Returns the active sub-document. |
| getSubDocumentById(sub-document_id) | RichEditDocument.getSubDocumentById | Returns the sub-document with the specified identifier. |
Sub-documents are implemented as SubDocument objects. They expose the following API resources, which can be used in the notation given below:
clientRichEditName.document.activeSubDocument.propertyName
| Member Name | Link | Description |
|---|---|---|
| type | SubDocument.type | Gets the sub-document type. |
| id | SubDocument.id | Gets the sub-document identifier. |
| text | SubDocument.text | Gets the document’s text. |
| length | SubDocument.length | Gets the length of the sub-document. |
| paragraphsInfo | SubDocument.paragraphsInfo | Returns information about paragraphs in the sub-document. |
| tablesInfo | SubDocument.tablesInfo | Returns information about tables in the sub-document. |
| bookmarksInfo | SubDocument.bookmarksInfo | Returns information about bookmarks in the sub-document. |
| inlinePicturesInfo | SubDocument.inlinePicturesInfo | Returns information about in-line pictures in the sub-document. |
| fieldsInfo | SubDocument.fieldsInfo | Returns information about fields in the sub-document. |
| floatingPicturesInfo | SubDocument.floatingPicturesInfo | Returns information about floating pictures in the sub-document. |
| floatingTextBoxesInfo | SubDocument.floatingTextBoxesInfo | Returns information about floating text boxes in the sub-document. |
| findFields | SubDocument.findFields | Returns an array of fields that match the search conditions. |
| findTables | SubDocument.findTables | Returns an array of tables that match the search conditions. |
You also can use the ASPxClientRichEdit.ActiveSubDocumentChanged method that fires when an active sub-document is substituted with another one.