microsoft / microsoft/monaco-editor
addExtraLib() method is adding the library to all editor available in a page
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
I am building a page that contains multiple monaco editors. I want to add instance specific libraries.
I have used addExtraLib() api to add libraries using:
monaco.languages.typescript.LanguageServiceDefaults.addExtraLib(content, filePath);
By this all editors are forced to have exactly the same libraries available across all editors in a page. I understand that anything which is configured via monaco.languages are defined globally. Is there any api through which I can update a library to a specific instance and not globally?
monaco-editor version: v0.20.0
Browser: Chrome
OS: macOS High Sierra
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 at monaco.languages.typescript.LanguageServiceDefaults.addExtraLib(content, filePath) and review the editor instance configuration entry points. Determine whether extra libraries can be scoped to one editor; done means the supported per-instance behavior, or the documented limitation, is clearly established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100