New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

monaco-element

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monaco-element

Webcomponent wrapper for the monaco editor.

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

<monaco-element>

Webcomponent wrapper for the monaco editor implementing basic functionality.

GitHub license

NPM

DEMO

Installation

npm install monaco-element

Usage (Polymer 3)

import 'monaco-element';

...

<monaco-element
  value="print('Hello World')"
  language="python"
  theme="vs-light"
  on-value-changed="handleEvent">
</monaco-element>

Caveats

Monaco Editor only works in light DOM, to make it work inside a custom component an iframe is created which loads loader.js (usually found in node_modules/monaco-editor/min/vs). When using this component <libPath>/loader.js has to be accessible.

Polymer

Add node_modules/monaco-editor/min/** to your extraDependencies in polymer.json to make the script available on polymer build.

Angular 6

Add this to the assets section of your angular.json:

{
  "glob": "**/*",
  "input": "./node_modules/monaco-editor/min/vs/",
  "output": "/node_modules/monaco-editor/min/vs/"
}

Acknowledgements

Inspired by PolymerVis/monaco-editor

Licence

MIT

Keywords

webcomponent

FAQs

Package last updated on 25 Jan 2019

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