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
{{ message }}
Repository navigation
blocksToFullHTML and blocksToHTMLLossy produces broken tables #1574
Describe the bug
The lack of tableWrapper, tableWrapper-inner, and inline styling (such as <table style="--default-cell-min-width: 120px; min-width: 494px;">) in the output HTML results in unstyled tables, which are entirely different from what we have in the editor.
To Reproduce
Create any table.
Output it using blocksToFullHTML or blocksToHTMLLossy
Hi, one of the reasons the styles are off is because exporting blocks to HTML only exports the HTML elements corresponding to those blocks. This doesn't include some wrapping elements of the editor, which are necessary for styling. You can fix that by rendering the exported HTML in such a structure:
Note that this has some dark theme specific classes/attributes too. Check the .bn-container and .bn-editor elements in your specific use case to see what you classes/attributes you need.
Also, the column widths are not being exported properly atm. I've created PR #1947 to address this, so that'll be shipped in the next release.
Activity
linear commentedon Aug 14, 2025
from matthewlipski:
YousefED commentedon Aug 18, 2025
@matthewlipski should we explain this in the docs / example? (wrapping classes)