DocumentSettings Object
Description
The DocumentSettings class provides properties which inform about general document settings, such as author and title, contained in the document the user is currently working on (see TXTextControl.documentSettings).
Syntax
DocumentSettingsExamples
The following example demonstrates DocumentSettings in a practical document-editing workflow. The DocumentSettings class provides properties which inform about general document settings, such as author and title, contained in the document the user is currently working on (see TXTextControl.documentSettings).
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.documentSettings.getAuthor(
function(result) {
console.log("get author result:", result);
},
onTxError
);Members
Properties
| Property | Description |
|---|---|
| embeddedFiles | Gets a collection of all files embedded in the document. |
Methods
| Method | Description |
|---|---|
| getAuthor | Gets the author of the current document. |
| getCreationDate | Gets the document's creation date as a unix timestamp. |
| getCreatorApplication | Gets the application, which has created the current document. |
| getDocumentBasePath | Gets a file path that is used to search for resources like images or hypertext links. |
| getDocumentKeywords | Gets the current document's keywords. The property value is null, if there are no keywords contained in the document. |
| getDocumentSubject | Gets the subject string of the current document. |
| getDocumentTitle | Gets the title string of the current document. |
| getUserDefinedDocumentProperties | Gets an object with all user-defined document properties contained in the current document. |
| setAuthor | Sets the author of the current document. |
| setCreationDate | Sets the document's creation date as a unix timestamp. |
| setCreatorApplication | Sets the application, which has created the current document. |
| setDocumentBasePath | Sets a file path that is used to search for resources like images or hypertext links. |
| setDocumentKeywords | Sets the current document's keywords. |
| setDocumentSubject | Sets the subject string of the current document. |
| setDocumentTitle | Sets the title string of the current document. |
| setUserDefinedDocumentProperties | Sets an object with all user-defined document properties contained in the current document. |