Skip to content

Commit 44b554f

Browse files
cbenmarijnh
authored andcommitted
Document direction option
Exists since commit 3c18925, codemirror#4624
1 parent f9e56e8 commit 44b554f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/manual.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,17 @@ <h2>Configuration</h2>
292292
character. By default, a red dot (<span style="color: red"></span>)
293293
is shown, with a title tooltip to indicate the character code.</dd>
294294

295+
<dt id="option_direction"><code><strong>direction</strong>: "ltr" | "rtl"</code></dt>
296+
<dd>Flips overall layout and selects base paragraph direction to
297+
be left-to-right or right-to-left. Default is "ltr".
298+
CodeMirror applies the Unicode Bidirectional Algorithm to each
299+
line, but does not autodetect base direction — it's set to the
300+
editor direction for all lines. The resulting order is
301+
sometimes wrong when base direction doesn't match user intent
302+
(for example, leading and trailing punctuation jumps to the
303+
wrong side of the line). Therefore, it's helpful for
304+
multilingual input to let users toggle this option.
305+
295306
<dt id="option_rtlMoveVisually"><code><strong>rtlMoveVisually</strong>: boolean</code></dt>
296307
<dd>Determines whether horizontal cursor movement through
297308
right-to-left (Arabic, Hebrew) text is visual (pressing the left

0 commit comments

Comments
 (0)