I'm using the tabulator package to try to turn a Google Spreadsheet into a readable/ filterable/ searchable table for a website.
The spreadsheet we are trying to format has fields with a large amount of text (some paragraphs and some bullet-points).
The tabulator package by default does not wrap text within each cell. The entire paragraph of text appears as a single line which runs on horizontally.
Is there a way to limit the width of the table, and to wrap text within each cell?
You need to use the textarea formatter on a column if you want the text to wrap in the cell
in the column definition for the cell
{title:"Long Text Column", field:"longtext", formatter:"textarea"},
The Formatting Documentation includes descriptions and examples of all the built-in formatters.
There are numerous ways to layout the columns, to either fit the data they contain or fit the table. the Layout Documentation includes detailed explanations and examples of the ways to layout the table.
If you are looking to set the width in px on a specific column, this can be done using the width property in the column definition:
{title:"Long Text Column", field:"longtext", formatter:"textarea", width:100},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With