It depends which table type you are using, if it is editable in our Plugin or not.
I will elaborate how adding new lines in our plugin can be done with the current capabilities.
-
1. for example, if you have an Editable Table and if you use a 'multi-line String' column with a 'multi-line Editor' input type.
So, if this is a Manual table, or Imported table from a file, during table generation you will be able to choose for each column which type it will be.
If you set the column from the start as a "multi-line String" , it gets saved in your database as "TEXT";
then you can use 'multi-line Editor' input,
and with the combination of pressing "shift+ENTER" you will be able to make new lines like that,
without the need for <br> HTML tags.
( If you already made the column as one-line string, you can go do the database, check in the Editing options what's the MySQL Table Name, then find this table and change the column type from VARCHAR to TEXT, which is a multi-line string).
-
2. Another way can be to use a "HTML Editor" as the chosen input type , and there you can just press "Enter" for new lines.
In HTML Editor you can just press "Enter" and it makes new lines, while in the background code it creates HTML markup, with paragraphs.
3. And finally, if you use Simple Tables, there you can use HTML Editor as well, for making new lines with "Enter",
and it adds custom HTML in the cell, but it renders only the text in the cell.
-
If you use "non editable tables", in other words - a table linked from file source like CSV/Excel/Google Sheet and similar, for them you need to insert HTML tag in the source cell for any 'line break'.
How do I create a line break in a cell? I see line breaks when creating the table, but not in the final result.
Hi Douglas,
It depends which table type you are using, if it is editable in our Plugin or not.
I will elaborate how adding new lines in our plugin can be done with the current capabilities.
-
1. for example, if you have an Editable Table and if you use a 'multi-line String' column with a 'multi-line Editor' input type.
So, if this is a Manual table, or Imported table from a file, during table generation you will be able to choose for each column which type it will be.
If you set the column from the start as a "multi-line String" , it gets saved in your database as "TEXT";
then you can use 'multi-line Editor' input,
and with the combination of pressing "shift+ENTER" you will be able to make new lines like that,
without the need for <br> HTML tags.
( If you already made the column as one-line string, you can go do the database, check in the Editing options what's the MySQL Table Name, then find this table and change the column type from VARCHAR to TEXT, which is a multi-line string).
-
2. Another way can be to use a "HTML Editor" as the chosen input type , and there you can just press "Enter" for new lines.
In HTML Editor you can just press "Enter" and it makes new lines, while in the background code it creates HTML markup, with paragraphs.
3. And finally, if you use Simple Tables, there you can use HTML Editor as well, for making new lines with "Enter",
and it adds custom HTML in the cell, but it renders only the text in the cell.
-
If you use "non editable tables", in other words - a table linked from file source like CSV/Excel/Google Sheet and similar, for them you need to insert HTML tag in the source cell for any 'line break'.
Let me know if you have any additional questions.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables