Use the [MediumEditor (15.5.x)] wysiwyg in your Angular2 application.
- Include MediumEditor javascript files in your application
- Install ng2-mediumeditor
- NPM :
npm install ng2-medium-editor
- NPM :
import {Component} from 'angular2/core';
import {MediumContentEditor} from 'ng2-medium-editor';
@Component({
selector: 'sample',
directives: [MediumContentEditor],
template: `<meditor [(ngModel)]="data.content" class="editable" #content="ngForm" ngControl="content"></meditor>`
})
export class Sample{
constructor(){
this.editorContent = `<p>My HTML</p>`;
}
}