{"id":22520529,"url":"https://github.com/web-acad/ng-codemirror","last_synced_at":"2026-04-28T22:33:54.832Z","repository":{"id":57169360,"uuid":"132161408","full_name":"Web-ACAD/ng-codemirror","owner":"Web-ACAD","description":"CodeMirror form component for angular","archived":false,"fork":false,"pushed_at":"2018-08-24T13:02:59.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T11:50:40.471Z","etag":null,"topics":["angular","codemirror","forms"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Web-ACAD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-04T16:02:37.000Z","updated_at":"2018-08-24T13:02:35.000Z","dependencies_parsed_at":"2022-09-04T11:01:39.735Z","dependency_job_id":null,"html_url":"https://github.com/Web-ACAD/ng-codemirror","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web-ACAD%2Fng-codemirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web-ACAD%2Fng-codemirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web-ACAD%2Fng-codemirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Web-ACAD%2Fng-codemirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Web-ACAD","download_url":"https://codeload.github.com/Web-ACAD/ng-codemirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245960835,"owners_count":20700783,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","codemirror","forms"],"created_at":"2024-12-07T05:07:49.913Z","updated_at":"2026-04-28T22:33:54.805Z","avatar_url":"https://github.com/Web-ACAD.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version](https://img.shields.io/npm/v/@webacad/ng-codemirror.svg?style=flat-square)](https://www.npmjs.com/package/@webacad/ng-codemirror)\n[![Build Status](https://img.shields.io/travis/Web-ACAD/ng-codemirror.svg?style=flat-square)](https://travis-ci.org/Web-ACAD/ng-codemirror)\n\n# WebACAD/CodeMirror\n\nCodeMirror form component for angular.\n\n## Dependencies\n\n* `@angular/common`\n* `@angular/core`\n* `@angular/forms`\n* `codemirror`\n* `rxjs`\n\n## Installation\n\n```bash\n$ npm install --save @webacad/ng-codemirror\n```\n\nor with yarn\n\n```bash\n$ yarn add @webacad/ng-codemirror\n```\n\n## Register module\n\n**app.module.ts:**\n\n```typescript\nimport {CodemirrorModule} from '@webacad/ng-codemirror';\n\n@NgModule({\n\timports: [\n\t\tCodemirrorModule,\n\t],\n})\nexport class AppModule {}\n```\n\n## Usage\n\n```html\n\u003cwa-codemirror mode=\"javascript\"\u003e\u003c/wa-codemirror\u003e\n```\n\n**Available options:**\n\n* `mode`: codemirror `mode` option\n* `theme`: codemirror `theme` option\n* `lineNumbers`: codemirror `lineNumbers` option\n* `viewportMargin`: codemirror `viewportMargin` option\n\n## Using in angular forms\n\nThis package implements all the necessary code for angular forms. That means that you can use it just like any other \nordinary form control.\n\n## App-wide configuration\n\nThe component itself provides only a few options for codemirror. If you need to have more control over the codemirror \nor if you want to configure it globally, use the `WA_CODEMIRROR_DEFAULTS` injection token:\n\n```typescript\nimport * as CodeMirror from 'codemirror';\n\nexport const AppCodeMirrorConfiguration: CodeMirror.EditorConfiguration = {\n\tlineNumbers: true,\n\ttheme: 'material',\n};\n```\n\nand register it in your app module:\n\n```typescript\nimport {CodemirrorModule, WA_CODEMIRROR_DEFAULTS} from '@webacad/ng-codemirror';\nimport {AppCodeMirrorConfiguration} from './codemirror-configuration';\n\n@NgModule({\n\timports: [\n\t\tCodemirrorModule,\n\t],\n\tproviders: [\n\t\t{\n\t\t\tprovide: WA_CODEMIRROR_DEFAULTS,\n\t\t\tuseValue: CodeMirrorConfiguration,\n\t\t},\n\t],\n})\nexport class AppModule {}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-acad%2Fng-codemirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweb-acad%2Fng-codemirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweb-acad%2Fng-codemirror/lists"}