clearOnEnter Not working in Textmark in codemirror


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


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


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