Configuration
new MobbSign(options) renders the viewer in an HTML element and returns a promise that resolves to the configured instance.
Connection
| Option | Type | Required | Description |
|---|---|---|---|
root | Element | Yes | Element where the viewer is rendered. It must have position: relative and a defined width and/or height. |
endpoint | string | Yes | Base URL of the MobbSign Server API. |
apiKey | string | Yes | API key of MobbSign Server. |
appID | string | Yes | App ID of MobbSign Server. |
Assets
| Option | Type | Required | Description |
|---|---|---|---|
configPath | string | Yes | Relative path to config.js. |
libPath | string | Yes | Relative path to the lib/ folder. |
imgUrl | string | Yes | Path or URL of the img/ folder. |
localesUrl | string | Yes | Path or URL of the translation files. |
Behaviour
| Option | Type | Default | Description |
|---|---|---|---|
language | string | en | Language of the interface: an ISO 639-1 code. English and Spanish are included; see Languages. |
signatureAcquisitionTimeout | number | 2000 | Time, in milliseconds, that the SDK waits after the signer lifts the pen before it considers the signature finished. |
blockNoTactileDevices | boolean | true | Blocks the use of the viewer on devices without a touchscreen. |
onlyRead | boolean | false | Hides the action buttons and shows the document read-only. |
signers | number[] | Identifiers of the signers who sign in this signing act. See Signers. | |
onlyFinishWhenEveryoneSign | number | 0 | When the Finish button is shown. See Finish the process. |
allowSignAfterDocumentIsSigned | boolean | true | Allows more signatures once all the signers of the document have signed. |
userToken | string | Only for the biometric signature with electronic seal: identification token of the user in the document manager, when it applies. | |
customization | object | Appearance of the buttons and the signature stroke. See Customisation. |
Events
| Option | Called when |
|---|---|
onDocumentLoaded | A document has been loaded. |
onSignatureAcquired | The signer has drawn a signature, before confirming or discarding it. |
onSignatureDiscarded | The signer has discarded the signature. |
onSignatureConfirmed | The signer has confirmed the signature, before the document is signed. |
onDocumentSigned | The document has been signed. |
onDoneButtonShown | The Finish button has been shown. Since version 2.2.0. |
onDone | The signer has finished the process. |
onError | An error has occurred. It receives the error. |
See Events & errors.