Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

monaco-editor-lc-comp

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monaco-editor-lc-comp

Lit Component for Monaco Languageclient

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
Maintainers
1
Weekly downloads
 
Created
Source

Lit Component for Monaco Languageclient

This packages provide a wrapped monaco-editor-core with inlined editor worker installed to monaco-languageclient that can connect to a configurable languages server.

The component can be fully configured with inlined JavaScript. It can be configured as regular or diff editor.

Web Component properties / configuration options

  • languageId: Specify the editor language (default: javascript)
  • code: Code or text that is shown in the editor (default: '');
  • modifiedCode: Only Diff Editor: Specify the modified language (default: javascript)
  • modifiedLanguageId: Only Diff Editor: Code or text that is shown in the modified editor. (default: '')
  • theme: Theme of the editor that is used (default: vs-light)
  • enableInlineConfig: Enable the inline editor configuration by specifying function getMonacoEditorOptions in inner script tag. You can directly pass monaco-editor options. See examples below. Attach the id directly to the name if you use more than one editor (e.g. getMonacoEditorOptions42).
  • useDiffEditor: Use the diff editor instead of the regular editor by specifying function getMonacoDiffEditorOptions. It can only be used if enableInlineConfig is passed. See examples below. Attach the id directly to the name if you use more than one editor (e.g. getMonacoDiffEditorOptions42).
  • WebSocket configuration options (or use getWebSocketOptions if enableInlineConfig is set):
    • wsSecured: Use secure connection (default: false)
    • wsHost: Specify host (default: localhost)
    • wsPort: Specify port (default: 8080)
    • wsPath: Specify path (default: '')

Usage Examples

You need to run npm i from the root of the project and npm run build here in this directory after cloning otherwise the examples below won't work properly.

You find a usage examples here:

  • Vite local dev with with three different editors: Run npm run dev to start here in this directory.
  • Vite bundle test with pure component config: Run npm run verify-vite here: ../../verify/monaco-editor-lc-comp.
  • Direct bundle test with inline diff editor and web socker config: Run npm run verify-direct here: ../../verify/monaco-editor-lc-comp.

Keywords

FAQs

Package last updated on 02 Mar 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc