Mohammad Mahdi Zamani19 downloadsSmart RTL support for mixed-language Obsidian notes.
Smart RTL support for mixed-language notes in Obsidian.
Any-RTL provides flexible right-to-left (RTL) and left-to-right (LTR) direction handling for Obsidian, with content-aware detection for mixed-language notes.
For the current development version:
https://github.com/zamanimm/obsidian-Any RTL.obsidian/plugins/any-rtl/
main.js
manifest.json
styles.css
| Mode | RTL character present | No RTL character | Behavior |
|---|---|---|---|
| LTR | LTR | LTR | Force left-to-right |
| RTL | RTL | RTL | Force right-to-left |
| Auto | Depends on the first strong directional character | Depends on the first strong directional character | Follow Obsidian’s automatic direction detection |
| Any-RTL | RTL | Depends on the first strong directional character | RTL if any RTL character is present |
A line is treated as RTL if it contains at least one RTL character:
📝 Example
سید علیسید aliseyed علیseyed ali
This is particularly useful for mixed-language content where RTL and LTR text appear in the same line.
Notes use the Default text direction unless a saved per-note direction or frontmatter override applies.
To remember a note’s direction without modifying its Markdown file:
Enable Remember text direction per file in Settings → Any-RTL.
Open the note and click the status bar’s direction indicator, or use the plugin’s text-direction command, to cycle through LTR → RTL → Any-RTL → Auto.
Your selection is saved in the plugin’s data.json and restored when the note is reopened. Disabling this setting makes notes use the default direction unless frontmatter specifies otherwise.
Set a note’s direction explicitly using YAML frontmatter:
---
direction: any-rtl
---
Supported values: rtl, ltr, auto, and any-rtl.
A valid frontmatter direction takes priority over saved per-note directions and the global default. UI changes do not modify frontmatter. With per-file remembering enabled, your selection is still saved, but frontmatter takes precedence when the note is reopened.
Close Obsidian and remove the note’s entry from fileDirections in:
<Vault>/.obsidian/plugins/any-rtl/data.json
Also remove any direction property from the note’s frontmatter.
Configure Any RTL from: Settings → Any RTL Available options include direction mode, detection behavior, per-file direction, and Reading Mode handling.
Any RTL builds on ideas and implementation patterns from these open-source Obsidian plugins:
MIT License. See License for details.