Angular
Use 82editor as a Angular component.
npm i @82editor/core @82editor/angularimport { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { Editor82Component } from '@82editor/angular';
@Component({
selector: 'app-write',
standalone: true,
imports: [FormsModule, Editor82Component],
template: `<editor-82 [(ngModel)]="html" [options]="{ toolbar: 'board', height: 400 }"></editor-82>`,
})
export class WriteComponent {
html = '';
}
// angular.json → "styles": ["node_modules/@82editor/core/dist/styles.css"]- A standalone component implementing
ControlValueAccessor: works withngModeland reactive forms. - Outputs:
(change),(ready). - Angular 17 or newer.
Reactive forms
form = new FormGroup({ content: new FormControl('') });
// <form [formGroup]="form"><editor-82 formControlName="content"></editor-82></form>