Skip to content

Angular

A standalone component with ngModel and reactive forms support. It starts in the browser only and runs outside the zone.

On this page

Install

Terminal
npm install @open-wysiwyg-editor/angular

Usage

"styles": [
  "node_modules/@open-wysiwyg-editor/angular/style.css",
  "src/styles.css"
]

Good to know

  • Inputs: value (two-way), options, placeholder, readonly. Outputs: valueChange, ready.
  • The control is marked touched on blur, and disable() makes the editor read-only.
  • It starts in afterNextRender, so it works with Angular SSR and hydration.

Always sanitize on the server

The editor sanitizes what it loads and produces, but that is not a security boundary: anyone can post any string to your API. Sanitize the HTML again with a library you trust before you store it or render it for other users.

Edit this page on GitHub