diff --git a/web/editor.js b/web/editor.js index 22080748a..01247326d 100644 --- a/web/editor.js +++ b/web/editor.js @@ -209,6 +209,10 @@ function maybeDisableButtons() { }; function wrap(front, back) { + if (currentField.dir == "rtl") { + front = "‫" + front + "‬"; + back = "‫" + back + "‬"; + } var s = window.getSelection(); var r = s.getRangeAt(0); var content = r.cloneContents();