How to add a cross on each line, as in the photo?
Easiest would probably a CSS :after element, either on the .CodeMirror-line class or on a class you add to specific lines with addLineClass.
:after
.CodeMirror-line
addLineClass