Lit, Alpine, htmx…
Anything that can print HTML can use the <owe-editor> tag: Lit, Alpine.js, htmx, Turbo, Ember, Qwik, WordPress and PHP. It fires input and change and takes part in forms.
On this page
Install
Usage
Good to know
- Load the CDN script and stylesheet once (or import
open-wysiwyg-editor/elementandstyle.css), then put the tag in your markup. - In Qwik, import the element inside a visible task so it never runs on the server. In WordPress,
esc_attr()keeps user content from breaking out of the attribute.
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.