{"id":29172273,"url":"https://github.com/yabab-dev/ng2-codemirror","last_synced_at":"2025-07-01T13:11:28.986Z","repository":{"id":57742090,"uuid":"63016926","full_name":"yabab-dev/ng2-codemirror","owner":"yabab-dev","description":"Angular2 CodeMirror component","archived":false,"fork":false,"pushed_at":"2019-11-25T19:36:37.000Z","size":23,"stargazers_count":70,"open_issues_count":23,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-14T18:58:09.475Z","etag":null,"topics":[],"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/yabab-dev.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":"2016-07-10T20:21:07.000Z","updated_at":"2024-11-06T20:07:51.000Z","dependencies_parsed_at":"2022-09-05T17:00:28.977Z","dependency_job_id":null,"html_url":"https://github.com/yabab-dev/ng2-codemirror","commit_stats":null,"previous_names":["chymz/ng2-codemirror"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/yabab-dev/ng2-codemirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fng2-codemirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fng2-codemirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fng2-codemirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fng2-codemirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yabab-dev","download_url":"https://codeload.github.com/yabab-dev/ng2-codemirror/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yabab-dev%2Fng2-codemirror/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261940341,"owners_count":23233520,"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":[],"created_at":"2025-07-01T13:11:06.177Z","updated_at":"2025-07-01T13:11:28.972Z","avatar_url":"https://github.com/yabab-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular - Codemirror component\n\nUse the [CodeMirror (5.x)](http://codemirror.net/) code editor in your Angular application.\n\n**Demo** : https://embed.plnkr.co/8e9gxss9u10VeFrv29Zt/\n\n### \u003ca name=\"install\"\u003e\u003c/a\u003eInstallation\n\n- Include Codemirror javascript files in your application (with files for modes)\n- Install ng2-codemirror\n  - JSPM : `jspm install npm:ng2-codemirror`\n  - NPM : `npm install ng2-codemirror`\n\n### \u003ca name=\"dependencies\"\u003e\u003c/a\u003eDependencies\nCodeMirror library is required for this component :\n  - Install via NPM : `npm install codemirror`\n  - Install via JSPM : `jspm install npm:codemirror`\n\nCodeMirror need to be accessible by `import 'codemirror'`\n\nThen you need to include base CSS of codemirror located in `codemirror/lib/codemirror.css`\n\n### \u003ca name=\"sample\"\u003e\u003c/a\u003eSample\n\nInclude `CodemirrorModule` in your main module :\n\n```javascript\nimport { CodemirrorModule } from 'ng2-codemirror';\n\n@NgModule({\n  // ...\n  imports:      [\n    CodemirrorModule\n  ],\n  // ...\n})\nexport class AppModule { }\n```\n\n```javascript\nimport { Component } from 'angular2/core';\n\n@Component({\n  selector: 'sample',\n  template: `\n    \u003ccodemirror [(ngModel)]=\"code\"\n      [config]=\"{...}\"\n      (focus)=\"onFocus()\"\n      (blur)=\"onBlur()\"\u003e\n    \u003c/codemirror\u003e\n  `\n})\nexport class Sample{\n  constructor(){\n    this.code = `// Some code...`;\n  }\n}\n```\n\n### \u003ca name=\"config\"\u003e\u003c/a\u003eConfiguration\n\n* `config` : The configuration object for CodeMirror see http://codemirror.net/doc/manual.html#config\n\n### \u003ca name=\"licence\"\u003e\u003c/a\u003eLicence\nSee `LICENSE` file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyabab-dev%2Fng2-codemirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyabab-dev%2Fng2-codemirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyabab-dev%2Fng2-codemirror/lists"}