Skip to main content

Configuration

new MobbSign(options) renders the viewer in an HTML element and returns a promise that resolves to the configured instance.

Connection​

OptionTypeRequiredDescription
rootElementYesElement where the viewer is rendered. It must have position: relative and a defined width and/or height.
endpointstringYesBase URL of the MobbSign Server API.
apiKeystringYesAPI key of MobbSign Server.
appIDstringYesApp ID of MobbSign Server.

Assets​

OptionTypeRequiredDescription
configPathstringYesRelative path to config.js.
libPathstringYesRelative path to the lib/ folder.
imgUrlstringYesPath or URL of the img/ folder.
localesUrlstringYesPath or URL of the translation files.

Behaviour​

OptionTypeDefaultDescription
languagestringenLanguage of the interface: an ISO 639-1 code. English and Spanish are included; see Languages.
signatureAcquisitionTimeoutnumber2000Time, in milliseconds, that the SDK waits after the signer lifts the pen before it considers the signature finished.
blockNoTactileDevicesbooleantrueBlocks the use of the viewer on devices without a touchscreen.
onlyReadbooleanfalseHides the action buttons and shows the document read-only.
signersnumber[]Identifiers of the signers who sign in this signing act. See Signers.
onlyFinishWhenEveryoneSignnumber0When the Finish button is shown. See Finish the process.
allowSignAfterDocumentIsSignedbooleantrueAllows more signatures once all the signers of the document have signed.
userTokenstringOnly for the biometric signature with electronic seal: identification token of the user in the document manager, when it applies.
customizationobjectAppearance of the buttons and the signature stroke. See Customisation.

Events​

OptionCalled when
onDocumentLoadedA document has been loaded.
onSignatureAcquiredThe signer has drawn a signature, before confirming or discarding it.
onSignatureDiscardedThe signer has discarded the signature.
onSignatureConfirmedThe signer has confirmed the signature, before the document is signed.
onDocumentSignedThe document has been signed.
onDoneButtonShownThe Finish button has been shown. Since version 2.2.0.
onDoneThe signer has finished the process.
onErrorAn error has occurred. It receives the error.

See Events & errors.