0.1.0 • Published 1 year ago

monaco-component v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

About

This is a minimal setup of Monaco Editor in a shape of web-component. The main idea behind this repo is to skip building process of editor on the local environment.

Getting Started

Prerequisites

To make it properly load from CDN you have to set a window.__monaco_component_base function that resolves a url

window.__monaco_component_base = function(filename) {
  return 'https://unpkg.com/monaco-component@latest/dist/' + filename
}

Installation

Load from a CDN

<script>
  window.__monaco_component_base = function(filename) {
    return 'https://unpkg.com/monaco-component@latest/dist/' + filename
  }
</script>
<script type="module" crossorigin src="https://unpkg.com/monaco-component@latest/dist/index.js"></script>
<script nomodule crossorigin src="https://unpkg.com/monaco-component@latest/dist/polyfills-legacy.js"></script>
<script nomodule crossorigin>System.import('https://unpkg.com/monaco-component@latest/dist/index-legacy.js')</script>

Install using NPM packages

npm install monaco-component

Usage

<monaco-editor
  value="<p>Hello world<p>"
  name="test"
  language="html"
  theme="monokai"
></monaco-editor>

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

0.1.0

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago