Skip to content

"Convert to HTML Table" Does Not Add the "Row Attributes" Option #9428

Closed
@MarleTangible

Description

@MarleTangible

Bug Description

When converting data to HTML, the row attributes option is ignored. Looks like Html.node.ts defines the variable as rowAttributes (singular) but it's referenced as rowsAttributes in plural form.

displayName: 'Row Attributes',
name: 'rowAttributes',
type: 'string',
default: '',
description: 'Attributes to attach to the table row',
placeholder: 'e.g. style="padding:10px"',

const rowsAttributes = this.getNodeParameter(
'options.rowsAttributes',
entryIndex,
'',
) as string;
table += `<tr ${rowsAttributes}>`;

And as a side request, would it be possible to also add headerCellAttributes and headerRowAttributes as well?

To Reproduce

  1. Add sample JSON data.
  2. Use HTML node to convert to html table.
  3. Enable custom styling and add row attributes.
  4. Output does not include the row styling.

Expected behavior

HTML node to add "row attributes" to the output data.

Operating System

Debian Bookworm

n8n Version

1.39.1

Node.js Version

18.19.1

Database

SQLite (default)

Execution mode

main (default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions