Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
angular-doc-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 { AngularDocEditorModule } 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,
AngularDocEditorModule // <- 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-doc-editor receives a total of 0 weekly downloads. As such, angular-doc-editor popularity was classified as not popular.
We found that angular-doc-editor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.