function createTooltip(cell, text, icon) {
          const frame = document.querySelector('.notion-frame');
          const notionOverlayContainer = document.querySelector('.notion-overlay-container');
          const createTooltipContainer = document.createElement('div');
          const tooltipText = text.innerText;
          const tooltipIcon = icon;
          const tooltipContainerHtml =
              `<div>
                <div class="admiraldus-truncated-table-titles-tooltip-svg">
                ${tooltipIcon}
                </div>

                <div class="admiraldus-truncated-table-titles-tooltip-text">
                ${tooltipText}
                </div>
              </div>`;

          createTooltipContainer.innerHTML = tooltipContainerHtml;
          createTooltipContainer.classList.add('admiraldus-truncated-table-titles-tooltip');
          createTooltipContainer.setAttribute('style', `max-width: ${cell.offsetWidth >= 450 ? cell.offsetWidth / 2 + 450 >= frame.offsetWidth ? frame.offsetWidth - 16 : cell.offsetWidth / 2 + 450 : 450}px;`);
          notionOverlayContainer.append(createTooltipContainer);

          const tooltipOffset = setTooltipOffset(cell, document.querySelector('.admiraldus-truncated-table-titles-tooltip'));
          createTooltipContainer.setAttribute('style', createTooltipContainer.getAttribute('style') + tooltipOffset);
        }
/**
         * Create and append tooltip HTML.
         *
         * @param   {HTMLDivElement}  cell  Target the table header cell.
         * @param   {string}          text  Get the title of the table header cell.
         * @param   {string}          icon  Get the HTML of the rendered svg.
         */
Create and append tooltip HTML.
@param   {HTMLDivElement}  cell  Target the table header cell.
@param   {string}          text  Get the title of the table header cell.
@param   {string}          icon  Get the HTML of the rendered svg.
Create and append tooltip HTML . @param { HTMLDivElement } cell Target the table header cell . @param { string } text Get the title of the table header cell . @param { string } icon Get the HTML of the rendered svg .
function createTooltip(cell, text, icon) {
          const frame = document.querySelector('.notion-frame');
          const notionOverlayContainer = document.querySelector('.notion-overlay-container');
          const createTooltipContainer = document.createElement('div');
          const tooltipText = text.innerText;
          const tooltipIcon = icon;
          const tooltipContainerHtml =
              `<div>
                <div class="admiraldus-truncated-table-titles-tooltip-svg">
                ${tooltipIcon}
                </div>
                <div class="admiraldus-truncated-table-titles-tooltip-text">
                ${tooltipText}
                </div>
              </div>`;
          createTooltipContainer.innerHTML = tooltipContainerHtml;
          createTooltipContainer.classList.add('admiraldus-truncated-table-titles-tooltip');
          createTooltipContainer.setAttribute('style', `max-width: ${cell.offsetWidth >= 450 ? cell.offsetWidth / 2 + 450 >= frame.offsetWidth ? frame.offsetWidth - 16 : cell.offsetWidth / 2 + 450 : 450}px;`);
          notionOverlayContainer.append(createTooltipContainer);
          const tooltipOffset = setTooltipOffset(cell, document.querySelector('.admiraldus-truncated-table-titles-tooltip'));
          createTooltipContainer.setAttribute('style', createTooltipContainer.getAttribute('style') + tooltipOffset);
        }
function createTooltip ( cell , text , icon ) { const frame = document . querySelector ( '.notion-frame' ) ; const notionOverlayContainer = document . querySelector ( '.notion-overlay-container' ) ; const createTooltipContainer = document . createElement ( 'div' ) ; const tooltipText = text . innerText ; const tooltipIcon = icon ; const tooltipContainerHtml = ` ${ tooltipIcon } ${ tooltipText } ` ; createTooltipContainer . innerHTML = tooltipContainerHtml ; createTooltipContainer . classList . add ( 'admiraldus-truncated-table-titles-tooltip' ) ; createTooltipContainer . setAttribute ( 'style' , ` ${ cell . offsetWidth >= 450 ? cell . offsetWidth / 2 + 450 >= frame . offsetWidth ? frame . offsetWidth - 16 : cell . offsetWidth / 2 + 450 : 450 } ` ) ; notionOverlayContainer . append ( createTooltipContainer ) ; const tooltipOffset = setTooltipOffset ( cell , document . querySelector ( '.admiraldus-truncated-table-titles-tooltip' ) ) ; createTooltipContainer . setAttribute ( 'style' , createTooltipContainer . getAttribute ( 'style' ) + tooltipOffset ) ; }
Create and append tooltip HTML.
Create and append tooltip HTML .