preact-richtextarea
A <textarea>
that supports HTML editing, powered by Preact & contentEditable.
Usage Example
Use <RichTextArea />
like a normal <input>
. It supports the same props/attributes, including value
, onInput()
and onChange()
.
; const HtmlEditor = <label class="html"> Body HTML: <RichTextArea value=html ...props /> </form>; let html = `<h1>hello</h1><p>Testing 1 2 3...</p>`;;
Usage with Linked State
<RichTextArea />
works with Linked State exactly the same way as any other input field:
; { return <form> <RichTextArea value=html onChange= this /> </form> ; } ;