diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index f23209266..b8b59b84d 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -959,7 +959,11 @@ function Ace2Inner(){ styled: setStyled, textface: setTextFace, textsize: setTextSize, - rtlistrue: setClassPresenceNamed(root, "rtl") + rtlistrue: function(value) { + setClassPresence(root, "rtl", value) + setClassPresence(root, "ltr", !value) + document.documentElement.dir = value? 'rtl' : 'ltr' + } }; var setter = setters[key.toLowerCase()];