node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »

ng2-meditor

ng2-medium-editor

Medium Editor component for Angular 2 (https://yabwe.github.io/medium-editor/)

Install

npm install --save ng2-meditor

How to use

Include Medium Editor script and style in index.html. Read from https://yabwe.github.io/medium-editor/

In your component:

...
import { MediumEditorComponent } from 'ng2-meditor';
 
@Component({
    selector: 'my-app',
    directives: [ MediumEditorComponent ],
    template: `
    <form ngForm="form">
        <medium-editor
            name="content"
            [(ngModel)]="content"
            placeholder="Replace your placeholder"></medium-editor>
    </form>
    `
})
 
export class AppComponent {
    content = '<h1>This is example!</h1>';
}
 
...