Quick Start
Installation
Install via Package managers such as npm or pnpm or yarn
npm install ngx-editorpnpm install ngx-editoryarn add ngx-editorUsage
Import NgxEditorComponent and initialize the editor
import { NgxEditorComponent, Editor } from 'ngx-editor';
@Component({ selector: 'app-component', templateUrl: 'app.component.html', styleUrls: ['app.component.scss'], standalone: true, imports: [NgxEditorComponent],})export class AppComponent implements OnInit, OnDestroy { html = 'Hello world!'; editor: Editor; ngOnInit(): void { this.editor = new Editor(); }
ngOnDestroy(): void { this.editor.destroy(); }}Then in HTML
<ngx-editor [editor]="editor" [ngModel]="html"></ngx-editor>For ngModel to work, You must import FormsModule from @angular/forms