0.2.10 • Published 2 years ago
beeonis-editor-react v0.2.10
Beditor v0.2.2
The Beditor library exported as Node.js modules.
Dependencies
- NPM:
^10.1.0 - Yarn:
1.22.19 - Node:
18.17.1 - React:
^18.2.0 - TypeScript:
>=4.7
Installation
Using npm:
npm install beeonis-editor-react -SUsing yarn:
yarn add beeonis-editor-react -SUsing
import { useState } from "react";
import Beditor from "beeonis-editor-react/Beditor";
const config = {...};
const YourComponent = () => {
const [beditorData, setBeditorData] = useState([]);
const [beditorErors, setBeditorErrors] = useState([]);
const onChange = (data, errors) => {
setBeditorData(data);
setBeditorErrors(errors);
};
return (
<>
...
<Beditor config={config} onChange={onChange} />
...
</>
);
};