In the call to createEditor, you can then pass the following gutter option:
gutter: { renderGutterLine: (lineNumber:number, gutterLineElement:GutterLineElement) => { // Remove any existing children so that we don't add multiple breakpoints. // And don't have breakpoints where they shouldn't be. gutterLineElement.accessorySpan.removeAllChildren();
// Insert a breakpoint on line 3. if (lineNumber===3) { constbreakpoint=document.createElement('div'); breakpoint.classList.add('breakpoint'); gutterLineElement.accessorySpan.appendChild(breakpoint); } }; }
Gutter Customization
This is the type of function that can be passed to the Gutter options which provides you with chance to customize gutter appearance.
Example: Inserting a Breakpoint
To insert a breakpoint, you can use the following code:
In the call to createEditor, you can then pass the following gutter option:
Example: Click Handler
In the call to createEditor, you can then pass the following gutter option:
For an overview of gutter customization, see Gutters.
For details about gutter line elements, see GutterLineElement.