Product:@pdftron/webviewer (react)
Product Version:10.4.0
Please give a brief summary of your issue:
i want to add default signature modal functions in my custom signature modal
or can we add custom tab in signature modal
Please describe your issue and provide steps to reproduce it:
const customElementName = "customSignatureModal";
const modal = {
dataElement: customElementName,
render: () => {
// besides passing a "render" method, you can use header, body, footer elements
// see API doc for more information
const customUI = document.createElement("div");
customUI.style.width = "400px";
customUI.style.height = "400px";
const closeButton = document.createElement("button");
closeButton.textContent = "Close";
closeButton.onclick = () => {
instance.UI.closeElements([customElementName]);
};
customUI.appendChild(closeButton);
// return a DOM element that you want to display
return customUI;
},
};
instance.UI.addCustomModal(modal);
// replace the default "signatureModal" with custom one
instance.UI.addEventListener("visibilityChanged", (e) => {
if (e.detail.element === "signatureModal" && e.detail.isVisible) {
instance.UI.closeElements(["signatureModal"]);
instance.UI.openElements([customElementName]);
}
});```