Skip to content

Commit

Permalink
add codemirror-rtl to rtl markdown cells (#5037)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2-farzan authored Jun 3, 2020
1 parent 80fc3c8 commit 2ac0ff3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions notebook/static/notebook/js/textcell.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ define([
'components/marked/lib/marked',
'codemirror/lib/codemirror',
'codemirror/mode/gfm/gfm',
'notebook/js/codemirror-ipythongfm'
'notebook/js/codemirror-ipythongfm',
'bidi/bidi'
], function(
$,
utils,
Expand All @@ -26,7 +27,8 @@ define([
marked,
CodeMirror,
gfm,
ipgfm
ipgfm,
bidi
) {
"use strict";
function encodeURIandParens(uri){return encodeURI(uri).replace('(','%28').replace(')','%29')}
Expand Down Expand Up @@ -300,7 +302,8 @@ define([

MarkdownCell.options_default = {
cm_config: {
mode: 'ipythongfm'
mode: 'ipythongfm',
direction: bidi.isMirroringEnabled() ? 'rtl' : 'ltr'
},
placeholder: "Type *Markdown* and LaTeX: $\\alpha^2$"
};
Expand Down

0 comments on commit 2ac0ff3

Please sign in to comment.