Skip to content

Instantly share code, notes, and snippets.

@itsvicsoto
Last active August 29, 2015 14:14
Show Gist options
  • Save itsvicsoto/355a8a42252b54326e6d to your computer and use it in GitHub Desktop.
Save itsvicsoto/355a8a42252b54326e6d to your computer and use it in GitHub Desktop.
Front-End Developer Resources

How to highlight multiple selections

Highlight the word:

var range = new Range(rowStart, columnStart, rowEnd, columnEnd);
var marker = editor.getSession().addMarker(range,"ace_selected_word", "text");
Remove the highlighted word:

editor.getSession().removeMarker(marker);
Highlight the line:

editor.getSession().addMarker(range,"ace_active_line","background");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment