Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

ng2-meditor

1.0.1 • Public • Published

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>';
}
 
...

install

npm i ng2-meditor

Downloadsweekly downloads

15

version

1.0.1

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar