ComPDFKit Web SDK
    Preparing search index...

    Function addCustomModal

    • Adds a custom modal. A modal with the same dataElement replaces the existing one. The modal stays hidden until it is opened with openElements([dataElement]); clicking the backdrop or pressing Escape closes it unless disableBackdropClick / disableEscapeKeyDown is set. header, body and footer each take { title, className, style, innerHTML, children }, where children are { title, button, className, style, onClick }; alternatively render returns an element or a string shown as the content.

      Parameters

      Returns void

      instance.UI.addCustomModal({
      dataElement: 'aboutModal',
      header: { title: 'About' },
      body: { innerHTML: '<p>Contract review workspace</p>' },
      footer: {
      children: [
      { title: 'Close', button: true, onClick: () => instance.UI.closeElements(['aboutModal']) },
      ],
      },
      });
      instance.UI.openElements(['aboutModal']);