DS Server

Javascript: SignatureFieldCollection.addWithMouse Method

Method|Introduced in 31.0

Description

Inserts a signature field with the built-in mouse interface. The signature field's size is determined through the end-user. A cross cursor indicates where the signature field can be inserted. Changing the document aborts the insertion process.

Syntax

<void> SignatureFieldCollection.addWithMouse(<FrameInsertionMode> insertionMode, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
insertionMode

Specifies how the text flow is handled.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates SignatureFieldCollection.addWithMouse in a practical document-editing workflow. It inserts a signature field with the built-in mouse interface. The signature field's size is determined through the end-user. A cross cursor indicates where the signature field can be inserted. Changing the document aborts the insertion process.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.signatureFields.addWithMouse(TXTextControl.FrameInsertionMode.AsCharacter, onTxError);