I’ve tried the following, I believe I’m making mistakes in understanding the documentation. I get script error when I try the below in my vaadin view.
@JavaScript("https://cdn.docuseal.co/js/form.js")
@Route("/viewer")
@AnonymousAllowed
@PermitAll
public class SignView2 extends VerticalLayout {
public SignView2() {
// Center the content
setAlignItems(FlexComponent.Alignment.CENTER);
// Create the custom HTML element
Element docusealForm = new Element("docuseal-form");
// Set the attributes for the element
docusealForm.setAttribute("id", "docusealForm");
docusealForm.setAttribute("data-src", "https://docuseal.co/d/LEVGR9rhZYf86M");
docusealForm.setAttribute("data-email", "signer@example.com");
// Append the element to the current element
getElement().appendChild(docusealForm);
}
}