microsoft / microsoft/monaco-editor
using linesDecorationsClassName we able to show vertical bar with some color, is posible to show on right side of the editor?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
Context
- This issue is not a bug report. (please use a different template for reporting a bug)
- This issue is not a duplicate of an existing issue. (please use the search to find existing issues)
Description
How to show vertical bar on the right hand side of the editor with some background color?
Monaco Editor Playground Link
Monaco Editor Playground Code
``var jsCode = [
'"use strict";',
"function Person(age) {",
" if (age) {",
" this.age = age;",
" }",
"}",
"Person.prototype.getAge = function () {",
" return this.age;",
"};",
].join("\n");
var editor = monaco.editor.create(document.getElementById("container"), {
value: jsCode,
language: "javascript",
});
var decorations = editor.createDecorationsCollection([
{
range: new monaco.Range(1, 0, 9, 0),
options: {
isWholeLine: true,
linesDecorationsClassName: "myLineDecoration",
},
},
]);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue provides a Monaco Editor Playground link and sample JavaScript using createDecorationsCollection and linesDecorationsClassName. Start by reproducing the example in the playground and checking the decoration API and related documentation. Done means establishing whether a right-side colored vertical bar is supported and documenting or implementing the requested behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100