Reputation: 475
I have been trying to customise syntax error on Ace editor. I disabled live syntax checker using this code below
editor.getSession().setUseWorker(false);
I have googled and try several answers on stackoverflow, no one of these work.
I want to get syntax error like
if there is error or warning
Please i need help. I am ready to learn it step by step.
Upvotes: 3
Views: 5725
Reputation: 475
I follow syntax issue created on Ace github and add some answers i got on stackoverflow.
Here his how i fix it
editor.getSession().on("changeAnnotation", function () {
var annot = editor.getSession().getAnnotations();
for (var key in annot) {
if (annot.hasOwnProperty(key))
console.log(annot[key].text + "on line " + " " + annot[key].row);
}
});
Upvotes: 11