ComPDFKit Web SDK
    Preparing search index...

    Function addPanel

    • Adds a panel. render is a built-in panel name (string) or a function that returns an HTMLElement or a string; the function is called once, when the panel is first shown. Open the panel with openElements([dataElement]).

      Parameters

      • panel: PanelData

        { dataElement, location, render }.

      Returns void

      instance.UI.addPanel({
      dataElement: 'infoPanel',
      location: 'right',
      render: () => {
      const div = document.createElement('div');
      div.textContent = 'Custom panel content';
      return div;
      },
      });
      instance.UI.openElements(['infoPanel']);