PHP Version
8.2
Version
2.0
Bug Description
I am trying to wrap the table output in a div with a "table-wrapper" class. I extended the \Tiptap\Nodes\Table class and changed the renderHtml function:
public function renderHTML($node, $HTMLAttributes = []) { return [ 'div', ['class' => 'table-wrapper'], [ 'content' => [ 'table', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), [ 'tbody', 0 ], ] ] ]; }
the result in html is got the format of:
table-wrapper
table
tbody
-content-
Expected Behavior
the result in html should be
table-wrapper
table
tbody
-content-
Additional Context (Optional)
there are example of the js version that it should work:
ueberdosis/tiptap#2041 (comment)
Dependency Updates
PHP Version
8.2
Version
2.0
Bug Description
I am trying to wrap the table output in a div with a "table-wrapper" class. I extended the \Tiptap\Nodes\Table class and changed the renderHtml function:
public function renderHTML($node, $HTMLAttributes = []) { return [ 'div', ['class' => 'table-wrapper'], [ 'content' => [ 'table', HTML::mergeAttributes($this->options['HTMLAttributes'], $HTMLAttributes), [ 'tbody', 0 ], ] ] ]; }the result in html is got the format of:
table-wrapper
table
tbody
-content-
Expected Behavior
the result in html should be
table-wrapper
table
tbody
-content-
Additional Context (Optional)
there are example of the js version that it should work:
ueberdosis/tiptap#2041 (comment)
Dependency Updates