npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jodit-angular

v1.14.2

Published

> Hey. Due to the fact that I do not use Angular in my projects, I cannot fix plugin errors in a timely manner. If you want the plugin to develop, send PR or better become a contributor

Downloads

7,373

Readme

Hey. Due to the fact that I do not use Angular in my projects, I cannot fix plugin errors in a timely manner. If you want the plugin to develop, send PR or better become a contributor

Jodit Angular Component

npm npm npm

This package is a wrapper around Jodit to make it easier to use in a Angular application.

for contributors

The editor component itselt is located in the jodit-angular 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.

Installation

$ npm install jodit-angular

Usage

Loading the component

Import the EditorModule from the npm package like this:

import { JoditAngularModule } from 'jodit-angular';

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,
    JoditAngularModule // <- 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>     

Event binding

You can also bind editor events via a shorthand prop on the editor, for example:

<jodit-editor (onChange)="handleEvent($event)"></jodit-editor>

Events list

  • onChange
  • onKeydown
  • onMousedown
  • onClick
  • onFocus
  • onPaste
  • onResize
  • onBeforeEnter
  • onBeforeCommand
  • onAfterCommand
  • onAfterExec
  • onAfterPaste
  • onChangeSelection

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.

Versions

  • Angular <= 8 use v1.0.*
  • Angular 9 use v1.9.*
  • Angular 10 use v1.10.*
  • Angular 11 use v1.11.*
  • Angular 12 use v1.12.*
  • Angular 13 use v1.13.*
  • Angular 14 use v1.14.*

License

This package is available under MIT License.