If I go to https://codemirror.net/demo/bidi.html
and execute the following snippet to place a bookmark at the beginning of an empty line and then place the cursor on that line, the caret goes to the right of the bookmark. When I start typing, the text appears to the left of the bookmark (as it should).
I tried fiddling with insertLeft option, but that will cause the text I write to end up on the right side of the bookmark.
Is this a bug in CodeMirror’s RTL handling, or am I doing something wrong?
cm = document.querySelector('.CodeMirror').CodeMirror;
elm = document.createElement('span');
elm.innerHTML = '<b>1.</b>'
cm.setBookmark({line: 2, ch: 0}, {
widget: elm
}
);
It is not a major issue, it just seems a bit strange that the caret ends up in a “readonly” place.