Skip to Content
API Referenceesign-react

@stesura/esign-react

The editor UI for @stesura/esign: the field node view, the Insert tab’s Signature group and signature-block snippets.

UI extension

createEsignUIExtension

E-signature fields in the editor: the field view and the Insert tab’s Signature group. The schema needs withEsign (@stesura/esign). Call once at module scope.

Parameters:
This function does not accept any parameters.
Returns:
StesuraUIExtension

Snippets

insertEsignSnippet

Inserts a signature-block snippet at the cursor. The labels are ordinary text in the editor’s locale, the author edits them freely. single uses signer; twoParties its default party roles.

Parameters:
NameTypeDefault
snippetEsignSnippet
tTranslationKeys
signerstring
Returns:
Command

EsignSnippet

type EsignSnippet = "single" | "twoParties" | "witness";

A signature-block snippet: one signer’s block, two parties side by side, or a witness’s signature and name.

Custom toolbars and views

EsignGroup

The Insert tab’s Signature group: insert a field for the current signer, pick or rename signers, insert signature-block snippets. With a field selected, the signer picker reassigns it and the field menu edits it.

Parameters:
NameTypeDefault
props{}
Returns:
ReactNode

esignProbes

Enabled-state probe for inserting a field, for a custom toolbar.

NameTypeDefault
insertTbProbe

esignSelectors

Toolbar selectors for the Signature group: the document’s signer roles and the selected field.

NameTypeDefault
rolesTbSelector<string[]>
selectedTbSelector<EsignFieldAttrs | null>

EsignFieldView

An e-signature field: a dashed box tinted by its signer, with its label and a signer badge, resizable per its kind. In print only the style border and the anchor token render; data-pdf-field (from the spec) is what the PDF export measures.

Parameters:
NameTypeDefault
propsOmit<NodeViewComponentProps, "ref"> & RefAttributes<HTMLSpanElement>
Returns:
ReactNode
Last updated on