You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//table
$builder = new \JBBCode\CodeDefinitionBuilder('table', '<table><tbody>{param}</tbody></table>');
array_push($this->definitions, $builder->build());
//thead
$builder = new \JBBCode\CodeDefinitionBuilder('th', '<th>{param}</th>');
array_push($this->definitions, $builder->build());
//tr
$builder = new \JBBCode\CodeDefinitionBuilder('tr', '<tr>{param}</tr>');
array_push($this->definitions, $builder->build());
//td
$builder = new \JBBCode\CodeDefinitionBuilder('td', '<td>{param}</td>');
array_push($this->definitions, $builder->build());
It forks fine except it requires all BBC in a table to be in single line. If any part of table is split to new line, empty line will be inserted on top of rendered TABLE.
When dealing with tables it is necessary to split table to several lines and even make indentation for elements to make it readable.
Is there a way to clean all new lines and spaces outside of TR and TD tags within a TABLE?
The text was updated successfully, but these errors were encountered:
Well, I guess you could implement a NodeVisitor that is removing all leading and trailing whitespaces via trim() in the TextNodes of your table. In general it is not a good idea to implement tables in BBCode, though.
Well it is necessity. The same issue is with lists or other HTML tags that have inner structure.
Thing is trim should not be executed always. IT should be optional. I guess good solution would be to provide events so we can add our own code to handle such situations for BBC that needs it.
I have set definitions to parse BBC for table as:
It forks fine except it requires all BBC in a table to be in single line. If any part of table is split to new line, empty line will be inserted on top of rendered TABLE.
When dealing with tables it is necessary to split table to several lines and even make indentation for elements to make it readable.
Is there a way to clean all new lines and spaces outside of TR and TD tags within a TABLE?
The text was updated successfully, but these errors were encountered: