Skip to content

[Feature] Add proper RTL support to marktext #5244

Closed as duplicate
Closed as duplicate

Description

@shayanoh

Summary

Currently the MarkText editor does not have proper support for per-document and per-block text direction for RTL languages, and working with RTL files is really hard. There should be an easy way to choose direction for a document, and a block.

Problem it solves

Anyone writing or editing documents in RTL languages like Farsi, Arabic, Hebrew will have problems using the editor, because the current settings is a global toggle that changes everything to RTL.

Proposed solution

Generally RTL markdown files are marked with an enclosing <div dir="rtl"></div>. Auto detect this and set the direction based on that, and add menu options to change the direction in the document. Also, Each block can use dir="rtl" or dir="ltr" to override the global direction.

This is implemented by me in PR #4804, and is waiting to be merged. Please test it and if something is not to your liking, comment and I'll update the code.

Activity

  1. shayanoh commented on Sep 4, 2026

    @shayanoh
    Author

    Similar issues that this will solve: #1919 #3569

  2. shayanoh commented on Sep 4, 2026

    @shayanoh
    Author

    This is a sample rtl markdown file what works with the new PR: rtl.md

  3. Jocs commented on Sep 18, 2026

    @Jocs
    Member

    Thanks for the detailed request, and for the implementation in #4804!

    Per-document and per-block text direction, instead of the single global Preferences → Editor → Misc → "Text direction" switch, is already tracked in #3569 (Automatic RTL/LTR per document) and #1919 (Always RTL or LTR — mixed-direction documents).

    Closing the issue as a duplicate of #3569 so the discussion lives in one thread — this does not close PR #4804, which stays open on its own. Please add your design (auto-detecting <div dir="rtl">, per-block dir overrides, menu entries) as a comment on #3569 and link the PR from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions