@robotcoral/ngx-codemirror6
TypeScript icon, indicating that this package has built-in type declarations

0.0.5 • Public • Published

ngx-codemirror6 npm npm

Angular Component for CodeMirror 6

Installation

To use this component in your project install it via npm

npm i @robotcoral/ngx-codemirror6 @codemirror/basic-setup --save

Using the component

Include CodeMirrorModule in your main module:

import { CodeMirrorModule } from "@robotcarol/ngx-codemirror6";

@NgModule({
  // ...
  imports: [CodeMirrorModule],
  // ...
})
export class AppModule {}

and add the ngx-codemirror selector to your feature component:

import { Component } from "@angular/core";

@Component({
  selector: "sample",
  template: ` <ngx-codemirror [config]="{...}"> </ngx-codemirror> `,
})
export class Sample {
  // ...
}

Configuration

You can pass an object of the type EditorStateConfig to the ngx-codemirror component via the [config] input.

Package Sidebar

Install

npm i @robotcoral/ngx-codemirror6

Weekly Downloads

8

Version

0.0.5

License

GPL-3.0-or-later

Unpacked Size

61.3 kB

Total Files

15

Last publish

Collaborators

  • robotcoral-bot
  • reuta
  • hoersamu
  • twihno