Skip to content

Custom elements inside table cells (e.g., <a> tags) #220

Description

@paul-maki

Support Question

Hi,

I was wondering if it’s possible to render custom HTML elements inside the table cells, such as <a> tags or other HTML elements.

Right now, the data is rendered directly inside elements. Is there a way to override or customize this behavior so that I can include elements like:

<td><a href="https://test.com">test.com</a></td>

Currently, we are using the “addEventListener” to display an <a> element inside a <td> (something like):

table.addStyleListener(() => {
   for (const td of table.querySelectorAll("tbody td")) {
      const a = document.createElement("a");
      // ...set <a> info
      td.appendChild(a);
   }
})

Does this approach make sense, or is there a better way to do it within the library’s existing functionality?

Thanks for your time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions