How to set the initial width of columns when creating a table in Lexical editor

112 Views Asked by At

I'm trying to define the initial width of the columns of the tables created in the lexical editor. I would like the widths to be defined in the style attributes of the TH tags, so that these properties are maintained when converting the table to HTML. Is there any way to do this in the plugin that handles table creation? I'm using the @lexical/table package.

Currently, the widths of the columns are defined in a separated CSS file, but these definitions are ignored when exporting the table to HTML, unless the style attribute of each th has a width property.

0

There are 0 best solutions below