Web component
<owe-editor> is the full editor as an HTML tag. It is a form-associated custom element in the light DOM, so there is no Shadow DOM and it is CSP-safe.
On this page
Install
Usage
Good to know
- The form submits the editor's HTML under
name, andform.reset()restores the starting content. A<label for>pointing at itsidbecomes the accessible name. - Use the
valueattribute or a<template>child when the content comes from users: neither can run anything before the editor sanitizes it.
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.