EmbeddedFileCollection Object
Description
Represents a collection of embedded files. To access the embedded files of a document use DocumentSettings.embeddedFiles.
Syntax
EmbeddedFileCollectionExamples
The following example demonstrates EmbeddedFileCollection in a practical document-editing workflow. It represents a collection of embedded files. To access the embedded files of a document use DocumentSettings.embeddedFiles.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.textParts.getMainText(function(mainText) {
const embeddedFiles = mainText.embeddedFiles;
console.log("EmbeddedFileCollection object:", embeddedFiles);
}, onTxError);Members
Methods
| Method | Description |
|---|---|
| addBinaryFile | Adds an embedded binary file to the collection. |
| addTextFile | Adds an embedded text file to the collection. |
| elementAt | Returns the element at a specified index in the collection. (Inherited from Collection.) |
| forEach | Executes a callback function for each element. (Inherited from Collection.) |
| getCount | Gets the number of elements contained in the collection. (Inherited from Collection.) |
| removeElementAt | Removes the embedded file at the given index. |