Ionaru / Ionaru/easy-markdown-editor

Set LTR on code blocks in edit mode, even when direction is RTL

Open
#424 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.1k
Forks
363
PR merge metrics
No merged PRs in 30d

Description

![image](https://user-images.githubusercontent.com/312166/167745178-fd71d7a2-ee2b-4ea8-9d72-242fcdea7255.png)

**Is your feature request related to a problem? Please describe.**
When `direction` is `rtl`, code block lines in edit view are also RTL.

**Describe the solution you'd like**
All code blocks (fenced or indented) should be LTR by default while editing.

**Describe alternatives you've considered**
Perhaps it should be controllable by an option or a button.

**Additional context**
I would note that preview suffers from the same problem. I added a bit of CSS to fix:

``` css
.editor-preview pre {
direction: ltr;
}
```

but there doesn't seem to be a specific CSS class added to code block lines in edit view.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.