Skip to content

Commit

Permalink
feat(ngx-jodit): new type for Jodit options: JoditConfig
Browse files Browse the repository at this point in the history
With JoditConfig you can now make use of the advantage of type
suggestions in your IDE when you write options for your NgxJodit
instance.
  • Loading branch information
julianpoemp committed Jan 10, 2024
1 parent 7129dcd commit d6cd94b
Show file tree
Hide file tree
Showing 6 changed files with 582 additions and 2,052 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Mono-repository for ngx-jodit & ngx-jodit-pro

If you want to use Jodit (free) you need to install ngx-jodit and for Jodit (Pro/Muli/OEM) you need to install ngx-jodit-pro. See the compatibility tables below for more information.
If you want to use Jodit (free) you need to install ngx-jodit and for Jodit (Pro/Multi/OEM) you need to install ngx-jodit-pro. See the compatibility tables below for more information.

## Third-party package
## About this repository

ngx-jodit and ngx-jodit-pro are third-party packages. There is no affiliation with Jodit. ngx-jodit and ngx-jodit-pro are under MIT-License. Jodit and Jodit-Pro can be under another license. For more information about licenses click on "more Information" next to a version of your choice. and scroll down to "License".
There is no affiliation with Jodit. ngx-jodit and ngx-jodit-pro are under MIT-License. Jodit and Jodit-Pro can be under another license. For more information about licenses click on "more Information" next to a version of your choice. and scroll down to "License".

## ngx-jodit</h1>

Expand All @@ -16,13 +16,13 @@ Angular wrapper for <a href="https://github.com/xdan/jodit">Jodit</a> WYSIWYG ed
<thead><tr><th>Ngx-jodit</th><th>Jodit</th><th>Angular</th><th>Type</th><th>Demo</th><th>Readme</th></tr></thead>
<tbody>
<tr>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit"></a></td><td>v3</td><td>v12 - v15</td><td>Module</td><td><a href="https://github.julianpoemp.com/ngx-jodit/1.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/blob/main/libs/ngx-jodit/README.md">Readme</a></td>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit"></a></td><td>v4</td><td>>= v16</td><td>Standalone</td><td><a href="https://github.julianpoemp.com/ngx-jodit/3.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/blob/main/libs/ngx-jodit/README.md">Readme</a></td>
</tr>
<tr>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit/v/2x"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit/2x"></a></td><td>v4</td><td>v12 - v15</td><td>Module</td><td><a href="https://github.julianpoemp.com/ngx-jodit/2.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/tree/v2.x/libs/ngx-jodit/README.md">Readme</a></td>
</tr>
<tr>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit/v/3x"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit/3x"></a></td><td>v4</td><td>>= v16</td><td>Standalone</td><td><a href="https://github.julianpoemp.com/ngx-jodit/3.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/tree/v3.x/libs/ngx-jodit/README.md">Readme</a></td>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit/v/1x"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit/1x"></a></td><td>v3</td><td>v12 - v15</td><td>Module</td><td><a href="https://github.julianpoemp.com/ngx-jodit/1.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/tree/v1.x/libs/ngx-jodit/README.md">Readme</a></td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -55,4 +55,4 @@ Please create new issues here only if it's related directly to ngx-jodit or ngx-

## Contribution

This project uses [@jscutlery/semver](https://github.com/jscutlery/semver) with angular preset. All commit must meet the Angular [commit message schema](https://gist.github.com/brianclements/841ea7bffdb01346392c) requirements. There are only three permitted scopes: "ngx-jodit", "ngx-jodit-pro" and "general" (for changes outside of libraries).
This project uses [@jscutlery/semver](https://github.com/jscutlery/semver) with Angular preset. All commit must meet the Angular [commit message schema](https://gist.github.com/brianclements/841ea7bffdb01346392c) requirements. There are only three permitted scopes: "ngx-jodit", "ngx-jodit-pro" and "general" (for changes outside of libraries).
4 changes: 2 additions & 2 deletions libs/ngx-jodit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Angular wrapper for <a href="https://github.com/xdan/jodit">Jodit</a> WYSIWYG ed
<thead><tr><th>Ngx-jodit</th><th>Jodit</th><th>Angular</th><th>Type</th><th>Demo</th><th>Readme</th></tr></thead>
<tbody>
<tr>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit"></a></td><td>v3</td><td>v12 - v15</td><td>Module</td><td><a href="https://github.julianpoemp.com/ngx-jodit/1.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/blob/main/libs/ngx-jodit/README.md">Readme</a></td>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit"></a></td><td>v4</td><td>>= v16</td><td>Standalone</td><td><a href="https://github.julianpoemp.com/ngx-jodit/3.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/blob/main/libs/ngx-jodit/README.md">Readme</a></td>
</tr>
<tr>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit/v/2x"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit/2x"></a></td><td>v4</td><td>v12 - v15</td><td>Module</td><td><a href="https://github.julianpoemp.com/ngx-jodit/2.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/tree/v2.x/libs/ngx-jodit/README.md">Readme</a></td>
</tr>
<tr>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit/v/3x"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit/3x"></a></td><td>v4</td><td>>= v16</td><td>Standalone</td><td><a href="https://github.julianpoemp.com/ngx-jodit/3.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/tree/v3.x/libs/ngx-jodit/README.md">Readme</a></td>
<td style="text-align:center;"><a href="https://www.npmjs.com/package/ngx-jodit/v/1x"><img alt="npm" src="https://img.shields.io/npm/v/ngx-jodit/1x"></a></td><td>v3</td><td>v12 - v15</td><td>Module</td><td><a href="https://github.julianpoemp.com/ngx-jodit/1.x/">Demo</a></td><td><a href="https://github.com/julianpoemp/ngx-jodit/tree/v1.x/libs/ngx-jodit/README.md">Readme</a></td>
</tr>
</tbody>
</table>
Expand Down
1 change: 1 addition & 0 deletions libs/ngx-jodit/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './lib/ngx-jodit.module';
export * from './lib/ngx-jodit/ngx-jodit.component';
export * from './lib/types';
4 changes: 2 additions & 2 deletions libs/ngx-jodit/src/lib/ngx-jodit/ngx-jodit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
SimpleChanges,
ViewChild
} from '@angular/core';
import {Config} from 'jodit/types/config';
import {JoditConfig} from '../types';
import {Jodit} from 'jodit';

@Component({
Expand All @@ -22,7 +22,7 @@ export class NgxJoditComponent implements AfterViewInit, OnDestroy, OnChanges {
@ViewChild('joditContainer') joditContainer!: ElementRef;
jodit?: Jodit;

@Input() options?: Partial<Config> = {};
@Input() options?: JoditConfig = {};

// value property
_value = '';
Expand Down
4 changes: 4 additions & 0 deletions libs/ngx-jodit/src/lib/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as JoditESMConfig from 'jodit/config';
import * as JoditCoreConfig from 'jodit/types/config';

export type JoditConfig = Partial<JoditCoreConfig.Config & JoditESMConfig.Config>;
Loading

0 comments on commit d6cd94b

Please sign in to comment.