Registrant
Registrant
nzamora   Yesterday, 17:06
#1

has anyone got a table in a Zenpage page to keep its borders and column widths after saving? i pasted a table from a spreadsheet into the page editor and the preview looked fine... then I hit save and it came out as plain text rows with no lines at all.

I'm on the default Zenpage setup with the TinyMCE editor, nothing customised. I checked the page source and the table tag is there but the style attributes are gone, so I guess the editor cleans them on save. do I need to add the styling in the theme css instead, or is there an option that stops the stripping?

it is only a small table, about six columns, so nothing fancy. but I'd like to update it by hand every week without fighting the editor.

Registrant
Registrant
josephevans   8 hours ago
#2

TinyMCE is almost certainly stripping the inline styles when you save. The more stable route is theme CSS: give the table a class and style borders, cell padding, and column widths there, e.g. .zenpage-table, .zenpage-table th, .zenpage-table td. For widths, CSS nth-child rules are usually easier to maintain than inline styles. If you specifically want TinyMCE to preserve style attributes, check its valid_elements/extended_valid_elements configuration in the Zenphoto TinyMCE plugin, but that is more fragile than putting the presentation in CSS.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.