RTL problem in chapter and book pages (with simple solution) #5486

Open
opened 2026-02-05 10:06:04 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @sshnevis on GitHub (Nov 9, 2025).

Describe the Bug

hi there

When we have right-to-left text, it is fine on the book pages, but it is not right-aligned on the chapter pages and FirstPage of Book.

Steps to Reproduce

when you add some arabic or persian text you see this:

Image

when i add dir="auto" in HTML, this visual problem has been solved
<main class="content-wrap card" dir="auto">
and
<div refs="entity-search@contentView" class="book-content" dir="auto">

As simple as that.

Expected Behaviour

the result must be like this:

Image

Screenshots or Additional Context

No response

Browser Details

No response

Exact BookStack Version

v24.12

Originally created by @sshnevis on GitHub (Nov 9, 2025). ### Describe the Bug hi there When we have right-to-left text, it is fine on the book pages, but it is not right-aligned on the **chapter pages** and **FirstPage of Book**. ### Steps to Reproduce when you add some arabic or persian text you see this: <img width="958" height="658" alt="Image" src="https://github.com/user-attachments/assets/635738e3-5bed-4ade-9341-4db49a1e1d08" /> when i add dir="auto" in HTML, this visual problem has been solved `<main class="content-wrap card" dir="auto">` and `<div refs="entity-search@contentView" class="book-content" dir="auto">` As simple as that. ### Expected Behaviour the result must be like this: <img width="931" height="671" alt="Image" src="https://github.com/user-attachments/assets/c310f9e2-2c78-4522-b91c-ecf2a8916f65" /> ### Screenshots or Additional Context _No response_ ### Browser Details _No response_ ### Exact BookStack Version v24.12
OVERLORD added the 🐛 Bug label 2026-02-05 10:06:04 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Nov 13, 2025):

Hi @sshnevis,

We do set dir="auto" for page content, but the main app UI layout direction is driven by the configured user language, since otherwise the UI will be pretty unstable, with different elements in different directions, or changing per view depending on the first language encountered.
So if you set your user language preference as Arabic or Persian, the whole user interface should switch to a RTL format.

@ssddanbrown commented on GitHub (Nov 13, 2025): Hi @sshnevis, We do set `dir="auto"` for page content, but the main app UI layout direction is driven by the configured user language, since otherwise the UI will be pretty unstable, with different elements in different directions, or changing per view depending on the first language encountered. So if you set your user language preference as Arabic or Persian, the whole user interface should switch to a RTL format.
Author
Owner

@sshnevis commented on GitHub (Nov 17, 2025):

Hello and many thanks
It was an interesting option. But the language is different for each book. Not for the user.
For example, we want the workspace to be English but we may have a Persian book. It is better to define these right-alignment settings in each section or have them be automatic.

@sshnevis commented on GitHub (Nov 17, 2025): Hello and many thanks It was an interesting option. But the language is different for each book. Not for the user. For example, we want the workspace to be English but we may have a Persian book. It is better to define these right-alignment settings in each section or have them be automatic.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5486