Bookstack Table Linebreaks are messed up... #129

Closed
opened 2026-02-04 17:06:27 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @fredericmohr on GitHub (Jul 8, 2016).

I think it's great that bookstack supports tables, both in markdown and in the WYSIWYG-editor. Unfortunately, the automatic linebreaks in those tables make them near unusable.

screenshot_20160708_121340

While it is possible to force linebreaks with <br>, that makes it hard to get properly formatted tables across different screen sizes. (notebooks, desktops, mobile?)

I think it would be sufficient if bookstack where to put linebreaks between words not characters.

Originally created by @fredericmohr on GitHub (Jul 8, 2016). I think it's great that bookstack supports tables, both in markdown and in the WYSIWYG-editor. Unfortunately, the automatic linebreaks in those tables make them near unusable. ![screenshot_20160708_121340](https://cloud.githubusercontent.com/assets/5955966/16684500/aab3434a-4505-11e6-9b99-bee63324660c.png) While it is possible to force linebreaks with `<br>`, that makes it hard to get properly formatted tables across different screen sizes. (notebooks, desktops, mobile?) I think it would be sufficient if bookstack where to put linebreaks between words not characters.
OVERLORD added the 🐛 Bug label 2026-02-04 17:06:27 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 21, 2016):

Hi @fredericmohr,

Unfortunately I have found this surprisingly tricky to fix, at least in a way that pleases all situations.
I enforced a high amount of breaking as long strings with no spaces, such as long urls, would push the table way out of the page.

The current styling works fine in chrome, due to support for word-break: break-all; which firefox does not support. I would like to find a fix to suit all at some point but for now, If you BookStack instance is used primarily by Firefox users, you can put the following in the 'Custom HTML head content' setting:

<style>
.page-content table {
    word-break: normal;
}
</style>
@ssddanbrown commented on GitHub (Aug 21, 2016): Hi @fredericmohr, Unfortunately I have found this surprisingly tricky to fix, at least in a way that pleases all situations. I enforced a high amount of breaking as long strings with no spaces, such as long urls, would push the table way out of the page. The current styling works fine in chrome, due to support for `word-break: break-all;` which firefox does not support. I would like to find a fix to suit all at some point but for now, If you BookStack instance is used primarily by Firefox users, you can put the following in the 'Custom HTML head content' setting: ``` <style> .page-content table { word-break: normal; } </style> ```
Author
Owner

@fredericmohr commented on GitHub (Aug 21, 2016):

I'm actually not sure if the users use it primarily in firefox. I just noticed it and thought it might be worth mentioning. It's nothing that would keep us from using BS (which is an odd shortcut for BookStack)

I assume the code you suggested would break things for Chrome? In that case, I'd rather wait (as long as it takes) for a fix in either BookStack or FF.

Anyway, thanks for a great tool!

@fredericmohr commented on GitHub (Aug 21, 2016): I'm actually not sure if the users use it primarily in firefox. I just noticed it and thought it might be worth mentioning. It's nothing that would keep us from using BS (which is an odd shortcut for BookStack) I assume the code you suggested would break things for Chrome? In that case, I'd rather wait (as long as it takes) for a fix in either BookStack or FF. Anyway, thanks for a great tool!
Author
Owner

@ssddanbrown commented on GitHub (Sep 6, 2016):

As of v0.12.1 words are not slice across lines in firefox. I thought about this and concluded the inconsistency and chopped words were more of an issue than long words pushing out the tables, Especially since that's in the user's control whereas the line breaking is not. I will now close this issue.

Thanks again @fredericmohr for pointing this issue out.

@ssddanbrown commented on GitHub (Sep 6, 2016): As of v0.12.1 words are not slice across lines in firefox. I thought about this and concluded the inconsistency and chopped words were more of an issue than long words pushing out the tables, Especially since that's in the user's control whereas the line breaking is not. I will now close this issue. Thanks again @fredericmohr for pointing this issue out.
Author
Owner

@fredericmohr commented on GitHub (Sep 7, 2016):

Thanks, I'll try it out as soon as I find the time :)

@fredericmohr commented on GitHub (Sep 7, 2016): Thanks, I'll try it out as soon as I find the time :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#129