![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@typefox/monaco-editor-react
Advanced tools
React component for Monaco-Editor and Monaco Languageclient
This packages provides a React component that it based on the monaco-editor-wrapper. It behaves nearly the same way as the monaco editor, with the primary difference being that you interact with it through a React component.
The monaco-languageclient can be activated to connect to a language server either via jsonrpc over a websocket to an exernal server process, or via the Language Server Protocol for the browser where the language server runs in a web worker.
All changes are noted in the CHANGELOG.
This is npm package is part of the monaco-languageclient mono repo. Please follow the main repositories instructions to get started with local development.
You can import the monaco react component for easy use in an existing React project. Below you can see a quick example of a fully functional implementation in TypeScript. The react component uses the same UserConfig
approach which is then applied to monaco-editor-wrapper
.
import React from 'react';
import ReactDOM from 'react-dom/client';
import '@codingame/monaco-vscode-python-default-extension';
import { WrapperConfig } from 'monaco-editor-wrapper';
import { MonacoEditorReactComp } from '@typefox/monaco-editor-react';
const wrapperConfig: WrapperConfig = {
$type: 'extendend',
htmlContainer: document.getElementById('monaco-editor-root')!,
editorAppConfig: {
codeResources: {
main: {
text: 'print("Hello, World!")',
uri: '/workspace/hello.py'
}
}
}
};
const comp = <MonacoEditorReactComp
wrapperConfig={wrapperConfig}
style={{ 'height': '100%' }}
onLoad={(wrapper: MonacoEditorLanguageClientWrapper) => {
// use the wrapper to get access to monaco-editor or the languageclient
}}
/>;
ReactDOM.createRoot(document.getElementById('react-root')!).render(comp);
For a detailed list of examples please look at this section in the main repository.
FAQs
React component for Monaco-Editor and Monaco Languageclient
We found that @typefox/monaco-editor-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.