clearOnEnter Not working in Textmark in codemirror


#1

I Want to use the clearOnEnter to make the mark to clear itself whenever the cursor enters its range , But it did not worked for me : I write :

editor.markText( {'ch': 0, 'line': 0 }, {'ch': 5, 'line': 0 }, { className: "bg"},{'inclusiveRight':true},{'inclusiveLeft':true},{'clearOnEnter': true});

But when I put the cursor in the range of mark it did not remove … so what wrong ??

in this picture I show you when I enter to range nothing happen


#2

You’re passing all the options to markText as separate arguments. They should go into a single object passed as 3rd argument.


#3

ok it work thank you verey much @marijn ???