@eventstore-ui/editor
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@eventstore-ui/editor

Monaco editor wrapped in a web component, with pre-built workers.

See Monaco Editor for more information about usage.

Add to your project

yarn add @eventstore-ui/editor

Also, include the peer dependencies:

yarn add @eventstore-ui/components @eventstore-ui/utils

Set up within a Stencil project:

In your stencil config, add the workers to your copy task.

// import the path to the workers
import { workerPath } from '@eventstore-ui/editor/configure';

export const config: Config = {
    // ...
    outputTargets: [
        {
            // ...
            copy: [
                // ...
                {
                    src: workerPath,
                    dest: 'workers',
                },
            ],
        },
    ],
};

In your globalScript file:

// Add the core web components to the global pool
import '@eventstore-ui/components';
// add the editor web components to the global pool
import '@eventstore-ui/editor';

// import the monaco initialization code
import { initialize } from '@eventstore-ui/editor/initialize';

// initialize the monaco library (with options, if required)
initialize();

Dependencies (1)

Dev Dependencies (12)

Package Sidebar

Install

npm i @eventstore-ui/editor

Weekly Downloads

271

Version

1.0.2

License

Apache-2.0

Unpacked Size

17.2 MB

Total Files

82

Last publish

Collaborators

  • hayleycampbell
  • georgepayne
  • ylorph-eventstore