Usage
<cui-signature-pad id="demoSignaturePad"
ui-line-width="2" ui-show-clear-button="true" ui-read-only="false" ui-disabled="false">
</cui-signature-pad>
const signaturePad = $UI.createComponent(componyx.UI.SignaturePad, {
id: 'demoSignaturePad',
lineWidth: 2,
showClearButton: true,
readOnly: false,
disabled: false,
containerElement: document.body
});
signaturePad.show();
// the signature as SVG markup, or an empty string
const svg = signaturePad.value;
// a PNG with black ink on a white background
const png = await signaturePad.toPng();
The value is SVG markup. Treat a submitted value like any other user input: check it on the server
with SignaturePadValidator.IsValid, and show it with an <img> or a
read-only SignaturePad, never by inserting it as HTML.