BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

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

Open sshnevis opened this issue 2 months ago • 2 comments

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

sshnevis avatar Nov 09 '25 10:11 sshnevis

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 avatar Nov 13 '25 15:11 ssddanbrown

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 avatar Nov 17 '25 15:11 sshnevis