This is a simple classic wysiwyg (What-You-See-Is-What-You-Get) editor for react.
npm install react-classic-wysiwyg-editor
import { useState } from 'react'
import { Editor } from 'react-classic-wysiwyg-editor'
import 'react-classic-wysiwyg-editor/dist/index.css'
const Example = () => {
const [content, setContent] = useState('')
return (
<>
<h1>WYSIWYG Editor</h1>
<Editor setContent={setContent} />
<h2>Saved Content:</h2>
{content && <div dangerouslySetInnerHTML={{ __html: content }}></div>}
</>
)
}
For examples of the react-classic-wysiwyg-editor
in action, go to demo
OR
To run that demo on your own computer:
- npm install react-classic-wysiwyg-editor
- npm start
- Visit http://localhost:3000/