microsoft / microsoft/monaco-editor
[Feature Request] Support for getting colorization ranges
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
There's already a colorize function which turns a string into colored HTML, it'd be useful in some cases to have a lower-level function also, one that tells you what CSS properties to apply in what ranges.
That would be handy for colorizing a string with the CSS Custom Highlight API, which when usable is way faster.
Monaco Editor Playground Link
No response
Monaco Editor Playground Code
No response
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
Start by reading the existing colorize function and how it produces colored HTML. Determine how a lower-level API should expose CSS properties and ranges for the CSS Custom Highlight API, then verify that the returned ranges reproduce the existing colorization behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100