-
-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict with @monaco-editor/react #802
Comments
@FernandoFernandesEverest mixing |
it's a problem probably only because it uses monaco-loader, which load another instance of monaco-editor (from the official package) but monaco-loader can be configured to use local monaco-editor, maybe it's worth giving it a try |
@CGNonofr Thanks for the suggestion, unfortunately it didn't work as well. So far What worked as workaround, was overriding the globalThis
|
Issue Description
When using
@typefox/monaco-editor-react
and@monaco-editor/react
in the same application, the editor models are not retained correctly when navigating between pages usingReactRouterDom
or similar routing libraries that do not trigger a full page reload.How to Reproduce
@typefox/monaco-editor-react
:this.monaco.editor.getModels().map(m => m.id)
Expected output: ["$model1"]
ReactRouterDom
or a similar routing library that does not trigger a full page reload.Create an editor instance using
@monaco-editor/react
:<MonacoEditor {...DEFAULT_EDITOR_CONFIG} />
this.monaco.editor.getModels().map(m => m.id)
Expected output: ["$model1", "$model2"]
Actual output: []
Expected Behavior
The editor models should be retained and the output should be ["$model1", "$model2"] after navigating between pages and creating a new editor instance.
Actual Behavior
The editor models are not retained, and the output is [] after navigating between pages and creating a new editor instance.
The text was updated successfully, but these errors were encountered: