To use the editor, import LMarkdownEditorModule and FormsModule in your Angular module. You can then use the <md-editor> component in your templates.
Important: When passing functions to inputs like [upload], [preRender], or [postRender], you must bind them in your component's constructor to ensure the correct this context.
import { LMarkdownEditorModule } from 'ngx-markdown-editor';
import { FormsModule } from '@angular/forms';
@NgModule({
imports: [
BrowserModule,
FormsModule,
LMarkdownEditorModule
],
// ...
})
export class AppModule { }
<md-editor
name="Content"
[(ngModel)]="content"
[height]="'200px'"
[mode]="mode"
[options]="options"
(onEditorLoaded)="onEditorLoaded($event)">
</md-editor>