Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ngx-jodit-pro
Advanced tools
Readme
Third-party Angular wrapper for Jodit PRO WYSIWYG editor. It supports Angular >= 12. You need a license key in order to use this wrapper. Buy here.
This is a third-party package with no affiliation to Jodit. See License.
This package does not contain the source code of Jodit Pro. You have to install it as described here (scroll down). This wrapper is licensed under MIT License, Jodit Pro is licensed seperately (see license).
Ngx-jodit-pro | Jodit Pro | Angular | Type | |
---|---|---|---|---|
v1.x | >= v12 | Module | more information | |
v2.x | >= v12 | Module | more information | |
v2.x | >= v16 | Standalone | more information |
The demo for ngx-jodit-pro is not available. You can find a demo of ngx-jodit (not Pro!) here.
Make sure that jodit@^3 is installed (v4 is still in beta and supported only with ngx-jodit >= v2, see compatibility table):
npm install jodit@^3 jodit-pro@^1 --save
jodit@^3 is needed for typings.
npm install ngx-jodit-pro --save
Add node_modules/jodit-pro/build/jodit.css
to your app's styles in angular.json (or project.json for
Nx):
...
,
"styles": [
"node_modules/jodit-pro/build/jodit.css",
...
],
...
Add node_modules/jodit-pro/build/jodit.js
to your app's scripts in angular.json (or project.json for
Nx):
...
,
"scripts": [
"node_modules/jodit-pro/build/jodit.js"
...
],
...
Add NgxJoditProModule
to the imports
array in your app.module.ts:
@NgModule({
...
imports: [
...,
NgxJoditProModule
],
...
})
Now you can use the component
<ngx-jodit-pro [(value)]="value" [options]="options" #joditComponent></ngx-jodit-pro>
At the moment each Pro plugin you want to use must be imported into you angular.json/project.json scripts and styles array. For example the tune-block plugin:
...
styles: [
... (after jodit css file)...,
"node_modules/jodit-pro/build/plugins/tune-block/tune-block.css",
],
scripts: [
... (after jodit js file) ...,
"node_modules/jodit-pro/build/plugins/tune-block/tune-block.js",
]
...
After that change restart your angular app. Now you can apply the plugin options to ngx-jodit-pro options
property.
You can access the initialized Jodit from the attribute "jodit" of the NgxJoditProComponent to use the Pro API:
Any component.ts:
import {ViewChild} from '@angular/core';
//...
@ViewChild("joditComponent") joditComponent?: NgxJoditProComponent;
// in ngAfterViewInit
if (this.joditComponent){
// example:
this.joditComponent.jodit.plugins.add("hello", ()=>{
alert("hello!");
});
}
Any component.html:
<ngx-jodit-pro #joditComponent ...></ngx-jodit-pro>
All options from Jodit are supported.
Name | Type | Description |
value | two-way data-binding | Updates as soon as HTML value of the editor changed. You can set your value, too. |
options | one-way data-binding | Sets options for Jodit |
You can bind events using the Angular way, e.g.:<ngx-jodit (joditChange)="onChange($event)"></ngx-jodit>
Name | Description |
joditChange | Triggers as soon as something of the HTML value changes. |
joditKeyDown | Triggers as soon as a key is pressed down. |
joditKeyUp | Triggers as soon as a key is released. |
joditMousedown | Triggers as soon as the left mouse button is pressed. |
joditMouseup | Triggers as soon as the left mouse button is released. |
joditClick | Triggers as soon as the user clicks on the editor. |
joditFocus | Triggers as soon as Jodit gets focus. |
joditPaste | Triggers as soon as something is pasted. |
joditResize | Triggers as soon as the editor resizes. |
joditBeforeEnter | Triggers as soon as enter key is pressed. |
joditBeforeCommand | Triggers before a command is executed. |
joditAfterExec | Triggers after a command is executed. |
joditAfterPaste | Triggers after something pasted. |
joditChangeSelection | Triggers as soon as selection is changed. |
FAQs
Angular wrapper for Jodit Pro WYSIWYG editor
The npm package ngx-jodit-pro receives a total of 175 weekly downloads. As such, ngx-jodit-pro popularity was classified as not popular.
We found that ngx-jodit-pro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.