Search code examples
javascriptace-editor

Highlighting an Ace Editor from outside


Hi I'm using Ace Editor to enhance an SQL Editor of a Web-interface of a database.

What I'm asking is if it's possible to highlight a specific line or word in the text content of the editor.

For example, I write some sql there, execute the query, and highlight a line based on an error/warning line that I get in the results when an error occurred.


Solution

  • You can use session.addMarker to add background to a range