Some smart features depends on the file URI. It is not the same as, but often maps to language server protocol features. For example, this includes completion and hover information. Typical editor operations are displaying a model, managing the view state, or executing actions or commands. This is what gets attached to the DOM and what your users see visually. EditorsĪn editor is a user facing view of the model. The number increases as more models are created. If a model is created without a URI, its URI will be inmemory://model/1. For example, you could use file:/// as a base path. Ideally when you represent content in Monaco editor, you should think of a virtual file system that matches the files your users are editing. This is why it's not possible for two models to have the same URI. For example, the model holds the text content, determines the language of the content, and tracks the edit history of the content. This could represent a file that exists on a file system, but it doesn't have to. A model represents a file that has been opened. It's what you interact with when managing content. Models are at the heart of Monaco editor. Some basic understanding about the underlying concepts is needed to use Monaco editor effectively. Monaco editor is best known for being the text editor that powers VS Code. It is recommended to develop against the dev version, and in production to use the min version. 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).inside /esm: ESM version of the editor (compatible with e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |