Next.js
The React package with a "use client" banner. Use it straight from Server Components and wire it to Server Actions with name.
On this page
Install
Usage
Good to know
- Import the stylesheet once, in
app/layout.tsx(orpages/_app.tsx). - A Server Component cannot pass functions such as
onChange. Use a client component for those, or usenamewith a Server Action. - You do not need
dynamic(…, { ssr: false }): nothing toucheswindowordocumentwhile rendering.
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.