{"id":20852973,"url":"https://github.com/julianpoemp/ngx-codejar","last_synced_at":"2025-05-12T05:31:02.743Z","repository":{"id":45780292,"uuid":"375786737","full_name":"julianpoemp/ngx-codejar","owner":"julianpoemp","description":"Angular wrapper for CodeJar code-editor. With this you can easily add code editors to your Angular app.","archived":false,"fork":false,"pushed_at":"2024-04-09T15:50:36.000Z","size":5880,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T14:42:44.846Z","etag":null,"topics":["angular","angular-lib","code-editor","codejar","highlighter","highlightjs","prismjs"],"latest_commit_sha":null,"homepage":"https://julianpoemp.github.io/ngx-codejar/","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/julianpoemp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-10T18:02:33.000Z","updated_at":"2025-05-01T18:36:48.000Z","dependencies_parsed_at":"2023-11-21T10:26:11.601Z","dependency_job_id":"9fb05e6d-7666-46bb-adcb-f441aa106a40","html_url":"https://github.com/julianpoemp/ngx-codejar","commit_stats":{"total_commits":107,"total_committers":4,"mean_commits":26.75,"dds":0.5887850467289719,"last_synced_commit":"84d2ba77ef5422fe9e85ea39afe4fd19ea3ec84d"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianpoemp%2Fngx-codejar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianpoemp%2Fngx-codejar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianpoemp%2Fngx-codejar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/julianpoemp%2Fngx-codejar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/julianpoemp","download_url":"https://codeload.github.com/julianpoemp/ngx-codejar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253681928,"owners_count":21946836,"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","angular-lib","code-editor","codejar","highlighter","highlightjs","prismjs"],"created_at":"2024-11-18T03:19:25.743Z","updated_at":"2025-05-12T05:30:57.732Z","avatar_url":"https://github.com/julianpoemp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngx-codejar \u003ca href=\"https://www.npmjs.com/package/ngx-codejar\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/ngx-codejar\"\u003e\u003c/a\u003e\n\nThis is an Angular wrapper for the code-editor [CodeJar](https://github.com/antonmedv/codejar) by Anton Medvedev. It\nallows to easily use CodeJar in Angular projects.\n\n\u003c!--suppress HtmlDeprecatedAttribute --\u003e\n\u003cdiv align=\"center\" style=\"max-width:100%;\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/julianpoemp/ngx-codejar/main/screenshots/thumbnail.png\" alt=\"thumbnail\"\u003e\n\u003c/div\u003e\n\n## Demo\n\nVisit the demo page: https://julianpoemp.github.io/ngx-codejar/\n\n## About CodeJar\n\nCodeJar is an embeddable javascript code-editor that supports different highlighter like Highlight.js or PrimsJs.\nAccording to the [main project](https://github.com/antonmedv/codejar) it has the following features:\n\n- Preserves indentation on a new line\n- Adds closing brackets, quotes\n- Indents line with the Tab key\n- Supports undo/redo\n\n## Compatibility\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n  \u003cth\u003eNgxCodeJar\u003c/th\u003e\n  \u003cth\u003eCodeJar\u003c/th\u003e\n  \u003cth\u003eAngular\u003c/th\u003e\n  \u003cth\u003eReadme\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e7.x\u003c/td\u003e\n\u003ctd\u003e4.x\u003c/td\u003e\n\u003ctd\u003e \u0026gt;= 16\u003c/td\u003e\n\u003ctd\u003e\n  \u003ca href=\"https://github.com/julianpoemp/ngx-codejar/blob/main/README.md\"\u003eREADME\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e6.x\u003c/td\u003e\n\u003ctd\u003e4.x\u003c/td\u003e\n\u003ctd\u003e15.x\u003c/td\u003e\n\u003ctd\u003e\n  \u003ca href=\"https://github.com/julianpoemp/ngx-codejar/blob/v6.x/README.md\"\u003eREADME\u003c/a\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Overview\n\n- [Install ngx-codejar with highlight.js](https://github.com/julianpoemp/ngx-codejar#how-to-use-codejar-with-angular-and-highlightjs)\n- [Install ngx-codejar with prism.js](https://github.com/julianpoemp/ngx-codejar#how-to-use-codejar-with-angular-and-prismjs)\n- [Options](https://github.com/julianpoemp/ngx-codejar#properties--events)\n- [Development](https://github.com/julianpoemp/ngx-codejar#development)\n- [Contribution](https://github.com/julianpoemp/ngx-codejar#development)\n- [Troubleshooting](https://github.com/julianpoemp/ngx-codejar#development)\n\n## Installation\n\n### How to use CodeJar with Angular and highlight.js\n\nIf you want to use CodeJar with [highlight.js](https://highlightjs.org/) you should do the following steps:\n\n1. Install highlight.js, CodeJar, codejar-linenumbers and ngx-codejar:\n\n  ````\n  npm install --save codejar codejar-linenumbers highlight.js ngx-codejar \u0026\u0026 npm install --save-dev @types/highlight.js\n  ````\n\n2. Import NgxCodeJarComponent `NgxCodeJarComponent` to your app's ngModule import property (standalone!):\n\n````typescript\n@NgModule({\n  declarations: [\n    // ...\n  ],\n  imports: [\n    // ...,\n    NgxCodeJarComponent\n  ],\n  // ...\n})\n````\n\n3. Select themes from `node_modules/highlight.js/styles` and add them to the styles section of your `angular.json`.\n4. Add `node_modules/codejar-linenumbers/es/codejar-linenumbers.css` to the styles section of your `angular.json`\n5. Now see https://julianpoemp.github.io/ngx-codejar/ on how to use it.\n\n### How to use CodeJar with Angular and Prism.js\n\nIf you want to use codejar with [prism.js](https://prismjs.com/) you should do the following steps:\n\n1. Install prism.js, codejar, codejar-linenumbers and ngx-codejar:\n\n  ````\n  npm install --save codejar codejar-linenumbers prismjs ngx-codejar \u0026\u0026 npm install --save-dev @types/prismjs\n  ````\n\n2. Import module `NgxCodeJarComponent` to your app's ngModule imports property (!standalone):\n\n````typescript\n@NgModule({\n    declarations: [\n        // ...\n    ],\n    imports: [\n        // ...,\n        NgxCodeJarComponent\n    ],\n    // ...\n})\n````\n\n3. Select themes from `node_modules/prismjs/themes` and add them to the styles section of your `angular.json`.\n4. Add `node_modules/codejar-linenumbers/es/codejar-linenumbers.css` to the styles section of your `angular.json`\n5. Now see https://julianpoemp.github.io/ngx-codejar/ on how to use it.\n\n### Properties \u0026 Events\n\n\u003ctable style=\"width:100%;\"\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth\u003eType\u003c/th\u003e\n\u003cth\u003eName\u003c/th\u003e\n\u003cth\u003eDescription\u003c/th\u003e\n\u003cth\u003eDefault\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eProperty\u003c/td\u003e\n\u003ctd\u003ecode\u003c/td\u003e\n\u003ctd\u003eproperty for two-way data-binding.\u003c/td\u003e\n\u003ctd\u003e-\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eProperty\u003c/td\u003e\n\u003ctd\u003ehighlighter\u003c/td\u003e\n\u003ctd\u003eselects which highlighter should be used ('prism' or 'hljs')\u003c/td\u003e\n\u003ctd\u003e'hljs'\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eProperty\u003c/td\u003e\n\u003ctd\u003eoptions\u003c/td\u003e\n\u003ctd\u003eOptions provided by CodeJar + additional Options (tabSize)\u003c/td\u003e\n\u003ctd\u003eDefaults provided by Codejar \u003ca href=\"https://github.com/antonmedv/codejar\"\u003eDefaults by CodeJar\u003c/a\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eProperty\u003c/td\u003e\n\u003ctd\u003eshowLineNumbers\u003c/td\u003e\n\u003ctd\u003eadds line numbers\u003c/td\u003e\n\u003ctd\u003efalse\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eProperty\u003c/td\u003e\n\u003ctd\u003ehighlightMethod\u003c/td\u003e\n\u003ctd\u003eset a method for code highlight\u003c/td\u003e\n\u003ctd\u003e\u003ccode\u003e(editor: CodeJarContainer) =\u003e {}\u003c/code\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eProperty\u003c/td\u003e\n\u003ctd\u003ereadonly\u003c/td\u003e\n\u003ctd\u003edefines if user is allowed to make code changes\u003c/td\u003e\n\u003ctd\u003efalse\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eEvent\u003c/td\u003e\n\u003ctd\u003eupdate\u003c/td\u003e\n\u003ctd\u003ethis event is triggered after the code was updated.\u003c/td\u003e\n\u003ctd\u003e-\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n## Development\n\nCall `npm start` to start the demo locally. Build the library using `ng build ngx-codejar`.\n\n## Contribution\n\nFeel free to create pull requests or issues with suggestions! :)\n\n## Troubleshooting\n\nThis package is just a wrapper for CodeJar. If you have any problems using it please make sure, that the problem is\nrelated to this wrapper.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianpoemp%2Fngx-codejar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjulianpoemp%2Fngx-codejar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjulianpoemp%2Fngx-codejar/lists"}