Questions tagged [react-monaco-editor]
21 questions
2
votes
2 answers
Set up listeners when a model is created or disposed for @monaco-editor/react
I have a web application containing a Monaco Editor. Previously, I used react-monaco-editor, now for some reasons, I'm thinking of switching to @monaco-editor/react.
With react-monaco-editor, I was able to code a DiagnosticsAdapter class to provide…

SoftTimur
- 5,630
- 38
- 140
- 292
1
vote
1 answer
Localize react-monaco-editor and set up monaco-editor-esm-webpack-plugin
I have a web application built with ReactJS, react-scripts (webpack), Monaco Editor, and react-monaco-editor. By default, the context menu is in English:
In the hover window, View Problem, Quick Fix, etc. are also in English.
Now, I would like to…

SoftTimur
- 5,630
- 38
- 140
- 292
1
vote
1 answer
Hover toolkit with actions
I'm trying to figure out how to configure the hover toolkit in monaco editor with clickable actions like in VS Code (see screenshot below) that execute another function. My app is react-based. I'd appreciate any ideas.
Example:
.
Dummy code:
const…

dawids8
- 19
- 4
1
vote
0 answers
Autocomplete and method descriptions for imported packages in monaco-editor/react
I am trying to add an in-browser IDE to a React app using @monaco-editor/react. Within the code editor I want users to be able to import Playwright and I want autocomplete and syntax highlighting to be correct for the various Playwright functions…

Lienid
- 11
- 1
1
vote
1 answer
Make a sample of react-monaco-editor in StackBlitz
I try to use https://github.com/react-monaco-editor/react-monaco-editor in StackBlitz.
Here is a very small sample: https://stackblitz.com/edit/react-ts-mq152n?file=EditorBasic.tsx,index.tsx
import * as React from 'react';
import MonacoEditor from…

SoftTimur
- 5,630
- 38
- 140
- 292
0
votes
0 answers
How to dispose onDidChangeCursorPosition event on Monaco editor react after event happened?
Edit: I used @monaco-editor/react for my app.
The problem is about, in my nextJS app I used onDidChangeCursorPosition event in Monaco Editor react to do some calculations. Now I need a lock button to stop doing those calculations. the dispose()…

Roshan Ghojoghi
- 1
- 2
0
votes
0 answers
When using defineTheme and setMonarchTokensProvider, the default theme is overridden
When using defineTheme and setMonarchTokensProvider, the default theme is overridden
I introduced the cpp language pack, but I wanted to customize some hints and highlight them, but when I set them, they overwrite the vs theme by…

laterday
- 353
- 1
- 4
- 11
0
votes
0 answers
Get compiled scss from @monaco-editor/react
Im using @monaco-editor/react editor module in reactjs , I know how to get a value(code) from editor but here I am using SCSS language so is there a way to get compiled css version
const editorRef = useRef(null);

Hunter
- 1,515
- 4
- 15
- 25
0
votes
1 answer
Duplicate suggestion in monaco editor react next js
I am using monaco-edtor to create a formula editor in React and Nextjs, I have an edit button to show and hide the editor, the editor only gets shown/mounted only when the user clicks the edit button.
at first, mounting the suggestion is coming as…

SREERAG R NANDAN
- 593
- 5
- 15
0
votes
0 answers
Monaco-jsx-highlighter get a webpack error
I just one course Stepen Grid. Monaco-jsx-highligter get error. Here code:
import 'bulmaswatch/superhero/bulmaswatch.min.css'
import './code-editor.css'
import Editor, { OnMount } from "@monaco-editor/react";
import { useRef } from…

feruz00
- 53
- 7
0
votes
1 answer
Monaco-React-Editor not validating user's html code
I'm trying to render errors created from the user's incorrect HTML code. According to the doc, this feature is available by default, but for some reason Monoco-React isn't catching the errors- it won't even log them. I'm using Monaco-React 1.1.0 and…

Ruination
- 15
- 1
- 5
0
votes
0 answers
How to create a parameter type hint?
I want to do this:
function onMyEvent(event)
{
event.someProperty
}
This question is the same as Provide type hints to monaco editor, but answers are not what i looking for.

soyunewok
- 115
- 7
0
votes
0 answers
How to synchronize text between Monaco Editor and a Docker container's file?
I'm developing an online IDE similar to CodeSandbox, utilizing Docker for running code in a sandboxed environment and Monaco Editor as the frontend for code editing.
I need assistance with managing the synchronization of text between the Monaco…

AshishPandagre
- 106
- 4
0
votes
0 answers
how to configure ctrl + shift + O shortcut in monaco editor to show all the files?
I am creating an online web ide, that has a file explorer and supports multiple tabs & I am using Monaco for the same.
Just like in VsCode, we can open the command palette by typing ctrl + shift + p. Similarly, in monaco editor, we can open command…

AshishPandagre
- 106
- 4
0
votes
0 answers
How to prevent suggest duplications between editors on single page?
I have monarch editor with custom language and suggestions
Here is how I define suggestions for component
export const RuleInput = (props) => {
...
useEffect(() => {
if (!isMonacoMounting) {
…

Nikita
- 1
- 1