Javascript: TXTextControl.AppendSettings Enumeration
Description
Determines how text is appended to the document.
Members
| Member | Description |
|---|---|
| None | The loaded text is inserted at the end of the last paragraph of the existing document. |
| StartWithNewParagraph | A new paragraph is created at the end of the document and the text is inserted in this paragraph. |
| StartWithNewSection | A new section is created at the end of the document and the text is inserted in this section. |
Examples
The following example uses TXTextControl.AppendSettings.StartWithNewParagraph (a new paragraph is created at the end of the document and the text is inserted in this paragraph.) in a document-editing workflow.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.append(
TXTextControl.StreamType.HTMLFormat,
"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAFgAH/qbPzWQAAAABJRU5ErkJggg==",
function(result) {
if (!result) {
console.warn("No load document callback data was returned.");
return;
}
console.log("append result:", result);
},
{ loadImages: true, loadHypertextLinks: true },
TXTextControl.AppendSettings.StartWithNewParagraph,
onTxError
);