Set Stamp Panel
javascript
// The default tabs
const tabs = [
{ type: 'custom', dataElement: 'IMPORT', text: 'Import' },
{ type: 'tab', dataElement: 'DYNAMIC' },
{ type: 'tab', dataElement: 'CUSTOM' },
]
// set up stamp panel tabs, the first one is import tab
// you can add panels.stamp.import in the translate file for localization
const customTabs = [
{ type: 'custom', dataElement: 'IMPORT', text: 'Import' }, // custom tab
{ type: 'tab', dataElement: 'DYNAMIC' },
{ type: 'tab', dataElement: 'CUSTOM' },
]
// setStampPanelTabs API can be used to set up the tabs in the stamp panel
instance.UI.setStampPanelTabs(customTabs)
// set up the active tab to IMPORT
instance.UI.setActiveElementTab('stampPanel', 'IMPORT')
// set up import stamps in the panel
instance.UI.setImportStamps(['base64 string'])Import Custom Stamp
javascript
// Get the custom stamps in the stamp panel
instance.UI.getCustomStamps()
// Add custom stamp to the stamp panel
instance.UI.addCustomStamps('base64 string')
// You can also set the custom stamps.
instance.UI.setCustomStamps(['base64 string'])