I have ace editor integrated in my site. I have some code there, and i want to highlight changes in some rows.
Found out that
var range = new Range(rowStart, columnStart, rowEnd, columnEnd);
var marker = editor.getSession().addMarker(range,"ace_active_line","background");
supposed to highlight rows, but i get illigal constructor error on the creation of Range object. Any ideas ?
Is there a way to add yellow background to specific lines ?
Thanks
The problem is here that Range
points to the browsers native range function and not to the Ace one. So you're probably not importing it. Try doing something like:
// taken from kitchen-sink.js
var Range = require("./range").Range;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With