You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/app/javascript/elements/flow_area.js

19 lines
407 B

export default class extends HTMLElement {
setValue (value) {
const { fieldType } = this.dataset
if (fieldType === 'signature') {
[...this.children].forEach(e => e.remove())
const img = document.createElement('img')
img.classList.add('w-full', 'h-full', 'object-contain')
img.src = value.url
this.append(img)
} else {
this.innerHTML = value
}
}
}