Namespace Highlights

Highlights

Highlights are lines that are highlighted across the entire editor.

They are useful for showing things like;

  • Current point of execution
  • Lines with errors
  • Lines with warnings
  • Lines with breakpoints
  • Lines with bookmarks
  • Lines with TODOs

Creating a highlight

Create a reactive highlight object with createHighlight:

const highlight = editor.createHighlight();
highlight.cssClass = 'highlight';
highlight.lineNumber = 1;
highlight.visible = true;

Changing the properties of the highlight will automatically update the editor.

Deleting a highlight

When you no longer want a highlight, and changing its visibility is not enough, you can delete it entirely:

highlight.delete();

See the Highlight interface for more information.

Index

Interfaces

Generated using TypeDoc