0.2.10 • Published 7 months ago

beeonis-editor-react v0.2.10

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

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 -S

Using yarn:

yarn add beeonis-editor-react -S

Using

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} />
      ...
    </>
  );
};