Gathering detailed insights and metrics for monaco-editor
Gathering detailed insights and metrics for monaco-editor
Gathering detailed insights and metrics for monaco-editor
Gathering detailed insights and metrics for monaco-editor
@monaco-editor/loader
the library aims to setup monaco editor into your browser
monaco-editor-webpack-plugin
A webpack plugin for the Monaco Editor
@monaco-editor/react
Monaco Editor for React - use the monaco-editor in any React application without needing to use webpack (or rollup/parcel/etc) configuration files / plugins
react-monaco-editor
Monaco Editor for React
npm install monaco-editor
Typescript
Module System
Node Version
68.2
Supply Chain
95.5
Quality
96
Maintenance
100
Vulnerability
99.6
License
JavaScript (61.25%)
TypeScript (37.2%)
HTML (1.49%)
CSS (0.04%)
Shell (0.02%)
SCSS (0.01%)
Total Downloads
161,639,915
Last Day
228,739
Last Week
1,415,897
Last Month
6,096,340
Last Year
62,280,089
40,767 Stars
3,430 Commits
3,618 Forks
527 Watching
23 Branches
295 Contributors
Minified
Minified + Gzipped
Latest Version
0.52.2
Package Id
monaco-editor@0.52.2
Unpacked Size
94.25 MB
Size
17.59 MB
File Count
1,467
Node Version
18.5.0
Publised On
09 Dec 2024
Cumulative downloads
Total Downloads
Last day
1.4%
228,739
Compared to previous day
Last week
1.9%
1,415,897
Compared to previous week
Last month
1.5%
6,096,340
Compared to previous month
Last year
52.8%
62,280,089
Compared to previous year
36
The Monaco Editor is the fully featured code editor from VS Code. Check out the VS Code docs to see some of the supported features.
Try out the editor and see various examples in our interactive playground.
The playground is the best way to learn about how to use the editor, which features is supports, to try out different versions and to create minimal reproducible examples for bug reports.
> npm install monaco-editor
You will get:
/esm
: ESM version of the editor (compatible with e.g. webpack)/dev
: AMD bundled, not minified/min
: AMD bundled, and minified/min-maps
: source maps for min
monaco.d.ts
: this specifies the API of the editor (this is what is actually versioned, everything else is considered private and might break with any release).It is recommended to develop against the dev
version, and in production to use the min
version.
Monaco editor is best known for being the text editor that powers VS Code. However, it's a bit more nuanced. Some basic understanding about the underlying concepts is needed to use Monaco editor effectively.
Models are at the heart of Monaco editor. It's what you interact with when managing content. A model represents a file that has been opened. This could represent a file that exists on a file system, but it doesn't have to. For example, the model holds the text content, determines the language of the content, and tracks the edit history of the content.
Each model is identified by a URI. This is why it's not possible for two models to have the same URI. Ideally when you represent content in Monaco editor, you should think of a virtual file system that matches the files your users are editing. For example, you could use file:///
as a base path. If a model is created without a URI, its URI will be inmemory://model/1
. The number increases as more models are created.
An editor is a user facing view of the model. This is what gets attached to the DOM and what your users see visually. Typical editor operations are displaying a model, managing the view state, or executing actions or commands.
Providers provide smart editor features. For example, this includes completion and hover information. It is not the same as, but often maps to language server protocol features.
Providers work on models. Some smart features depends on the file URI. For example, for TypeScript to resolve imports, or for JSON IntelliSense to determine which JSON schema to apply to which model. So it's important to choose proper model URIs.
Many Monaco related objects often implement the .dispose()
method. This method is intended to perform cleanups when a resource is no longer needed. For example, calling model.dispose()
will unregister it, freeing up the URI for a new model. Editors should be disposed to free up resources and remove their model listeners.
monaco.d.ts
.Create issues in this repository for anything related to the Monaco Editor. Please search for existing issues to avoid duplicates.
❓ What is the relationship between VS Code and the Monaco Editor?
The Monaco Editor is generated straight from VS Code's sources with some shims around services the code needs to make it run in a web browser outside of its home.
❓ What is the relationship between VS Code's version and the Monaco Editor's version?
None. The Monaco Editor is a library and it reflects directly the source code.
❓ I've written an extension for VS Code, will it work on the Monaco Editor in a browser?
No.
Note: If the extension is fully based on the LSP and if the language server is authored in JavaScript, then it would be possible.
❓ Why all these web workers and why should I care?
Language services create web workers to compute heavy stuff outside of the UI thread. They cost hardly anything in terms of resource overhead and you shouldn't worry too much about them, as long as you get them to work (see above the cross-domain case).
❓ What is this loader.js
? Can I use require.js
?
It is an AMD loader that we use in VS Code. Yes.
❓ I see the warning "Could not create web worker". What should I do?
HTML5 does not allow pages loaded on file://
to create web workers. Please load the editor with a web server on http://
or https://
schemes.
❓ Is the editor supported in mobile browsers or mobile web app frameworks?
No.
❓ Why doesn't the editor support TextMate grammars?
monaco-editor
, vscode-oniguruma
and vscode-textmate
to get TM grammar support in the editor.We are welcoming contributions from the community! Please see CONTRIBUTING for details how you can contribute effectively, how you can run the editor from sources and how you can debug and fix issues.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Licensed under the MIT License.
No vulnerabilities found.
Reason
30 commit(s) out of 30 and 1 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
all last 30 commits are reviewed through GitHub
Reason
no vulnerabilities detected
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
update tool detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
Reason
no badge detected
Reason
non read-only tokens detected in GitHub workflows
Details
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More