Javascript: DocumentSettings.getDocumentBasePath Method
Description
Gets a file path that is used to search for resources like images or hypertext links.
Syntax
<void> DocumentSettings.getDocumentBasePath(<RequestStringCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates DocumentSettings.getDocumentBasePath in a practical document-editing workflow. It gets a file path that is used to search for resources like images or hypertext links.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.documentSettings.getDocumentBasePath(
function(result) {
console.log("get document base path result:", result);
},
onTxError
);