7.0.3 • Published 30 days ago

ngx-codejar v7.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
30 days ago

ngx-codejar

This is an Angular wrapper for the code-editor CodeJar by Anton Medvedev. It allows to easily use CodeJar in Angular projects.

Demo

Visit the demo page: https://julianpoemp.github.io/ngx-codejar/

About CodeJar

CodeJar is an embeddable javascript code-editor that supports different highlighter like Highlight.js or PrimsJs. According to the main project it has the following features:

  • Preserves indentation on a new line
  • Adds closing brackets, quotes
  • Indents line with the Tab key
  • Supports undo/redo

Compatibility

Overview

Installation

How to use CodeJar with Angular and highlight.js

If you want to use CodeJar with highlight.js you should do the following steps:

  1. Install highlight.js, CodeJar, codejar-linenumbers and ngx-codejar:

    npm install --save codejar codejar-linenumbers highlight.js ngx-codejar && npm install --save-dev @types/highlight.js
  2. Import NgxCodeJarComponent NgxCodeJarComponent to your app's ngModule import property (standalone!):

@NgModule({
  declarations: [
    // ...
  ],
  imports: [
    // ...,
    NgxCodeJarComponent
  ],
  // ...
})
  1. Select themes from node_modules/highlight.js/styles and add them to the styles section of your angular.json.
  2. Add node_modules/codejar-linenumbers/es/codejar-linenumbers.css to the styles section of your angular.json
  3. Now see https://julianpoemp.github.io/ngx-codejar/ on how to use it.

How to use CodeJar with Angular and Prism.js

If you want to use codejar with prism.js you should do the following steps:

  1. Install prism.js, codejar, codejar-linenumbers and ngx-codejar:

    npm install --save codejar codejar-linenumbers prismjs ngx-codejar && npm install --save-dev @types/prismjs
  2. Import module NgxCodeJarComponent to your app's ngModule imports property (!standalone):

@NgModule({
    declarations: [
        // ...
    ],
    imports: [
        // ...,
        NgxCodeJarComponent
    ],
    // ...
})
  1. Select themes from node_modules/prismjs/themes and add them to the styles section of your angular.json.
  2. Add node_modules/codejar-linenumbers/es/codejar-linenumbers.css to the styles section of your angular.json
  3. Now see https://julianpoemp.github.io/ngx-codejar/ on how to use it.

Properties & Events

Development

Call npm start to start the demo locally. Build the library using ng build ngx-codejar.

Contribution

Feel free to create pull requests or issues with suggestions! :)

Troubleshooting

This package is just a wrapper for CodeJar. If you have any problems using it please make sure, that the problem is related to this wrapper.

7.0.3

30 days ago

6.1.4

2 months ago

7.0.0

2 months ago

7.0.2

2 months ago

7.0.1

2 months ago

6.1.3

2 months ago

6.1.2

2 months ago

6.1.1

5 months ago

6.1.0

6 months ago

5.2.0

10 months ago

6.0.0

9 months ago

5.1.6

11 months ago

5.1.5

12 months ago

5.1.4

1 year ago

5.1.3

1 year ago

5.1.2

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago