Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
angular-document-editor
Advanced tools
[![npm](https://img.shields.io/npm/v/angular-doc-editor.svg)](https://www.npmjs.com/package/angular-doc-editor) [![npm](https://img.shields.io/npm/dm/angular-doc-editor.svg)](https://www.npmjs.com/package/angular-doc-editor) [![npm](https://img.shields.io
This package is a wrapper around Jodit to make it easier to use in a Angular application.
The editor component itselt is located in the angular-doc-editor
folder and packaged into a redistributable package with the ng-packagr tool. A test app has been created with the @angular/cli. It is located in the src directory and a dev server can be started by using the npm start
command.
$ npm install angular-doc-editor
Import the EditorModule from the npm package like this:
import { AngularDocumentEditorModule } from 'angular-doc-editor';
And add it to you application module:
// This might look different depending on how you have set up your app
// but the important part is the imports array
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AngularDocumentEditorModule // <- Important part
],
providers: [],
bootstrap: [AppComponent]
})
Using the component in your templates Use the editor in your templates like this:
<jodit-editor [config]="{buttons: 'bold'}"></jodit-editor>
In config you can set all Jodit's options
Note about toolbar buttons override:
Jodit editor apply a different toolbar buttons layout based on width available for the editor itself. So a different width size for editor will show a different buttons layout. The "buttons" config setting in the example above will override only the default toolbar buttons for large widths. If you want to override buttons displayed on all editor sizes use something like this:
<jodit-editor
[config]="{
buttons: 'bold,strikethrough,underline,italic'
buttonsMD: 'bold,strikethrough,underline,italic'
buttonsSM: 'bold,strikethrough,underline,italic'
buttonsXS: 'bold,strikethrough,underline,italic'
};"
></jodit-editor>
You can also bind editor events via a shorthand prop on the editor, for example:
<jodit-editor (onChange)="handleEvent($event)"></jodit-editor>
Where the handler gets called with an object containing the properties event, which is the event object, and editor, which is a reference to the editor.
This package is available under MIT
License.
FAQs
[![npm](https://img.shields.io/npm/v/angular-doc-editor.svg)](https://www.npmjs.com/package/angular-doc-editor) [![npm](https://img.shields.io/npm/dm/angular-doc-editor.svg)](https://www.npmjs.com/package/angular-doc-editor) [![npm](https://img.shields.io
The npm package angular-document-editor receives a total of 99 weekly downloads. As such, angular-document-editor popularity was classified as not popular.
We found that angular-document-editor 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.