Relative Content

Tag Archive for monaco-editor

How do I access the globalThis.ts object in monaco?

In the GitHub sources, I can see that globalThis.ts points to typescript as used by monaco. My first thought was that it would be available on window, but monaco uses a webworker, so has a different context to my code.

How to write a custom language worker with Typescript

We want to develop a custom Web Worker for our custom language with typescript. We already wrote a working Web Worker, but since the worker code imports monaco stuff from js files under esm directory (e.g. monaco-editor/esm/vs/editor/common/languages), we lose the typing information. We attempted to import from monaco-editor/esm/vs/editor/editor.api.js, but then the worker couldn’t start (error message pasted below).

Why does space change when using custom font in Monaco editor on web?

We are attempting to create a browser-based IDE from scratch, using the Monaco editor. To make this project more unique, we are using a custom font in the editor for code. When the user tries to select text in the editor, it gets squished together. Why does this happen, and is there any way to make it stop?