Skip to main content

Editor42 in an Angular app

When to use

When the editor is a form control in an Angular app — template-driven or reactive, it behaves like any other.

How it works

The standalone <editor> component from @editor42/editor42-angular, bound with [(ngModel)]. An Angular project compiles this ahead of time with the CLI; a demo page has no build step, so the same component is compiled in the browser instead — that is what the @angular/compiler and reflect-metadata imports at the top are for. Your own app needs neither.

How to start using

Install the component with npm install @editor42/editor42-angular and put <editor> in your template — it is standalone, and implements ControlValueAccessor so ngModel and reactive forms both work.

See the Angular install page for self-hosting and the move from @tinymce/tinymce-angular.