django-mdeditor
django-mdeditor copied to clipboard
RTL language support (e.g. Arabic) is broken in editor view
When using django-mdeditor with right-to-left (RTL) languages like Arabic, the visual preview works correctly in RTL — but the actual editor (textarea) and line numbers remain left-to-right. This leads to confusing alignment and a broken editing experience.
🔍 Observed behavior
- The preview (
.editormd-html-preview) renders RTL correctly ✅ - The editor input (
textareaand.CodeMirror) stays LTR ❌ - Line numbers and text do not align with RTL direction ❌
- Toolbar remains LTR — which is correct ✅
✅ Desired behavior
When the language is set to an RTL language (e.g. ar, fa, he, ur), the entire editor area should be rendered with dir="rtl", including:
- Markdown editor input
- Line numbers
- Preview
- Base
.editormdwrapper
这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
@pylixm
Hello, Are you back from vacation?