This file provides documentation for the HugeRTE React integration package.
The repo linked above comes with a storybook showing examples of integrating HugeRTE with React. To run the storybook, follow the following steps:
- Clone the repo:
git clone https://github.com/hugerte/hugerte-react
- Install dependencies:
yarn
- Run the storybook:
yarn storybook
View the source code of the Storybook examples..
Add the HugeRTE React component to your project using npm (or an npm-based package manager like yarn):
npm install @hugerte/hugerte-react
or:
yarn add @hugerte/hugerte-react
Then, you could copy an appropiate demo piece from the storybook file linked above into your project. While the storybook file contains import { Editor, IAllProps } from '../main/ts/components/Editor';
, you should import from @hugerte/hugerte-react
instead. If your code will contain non-trivial portions of demo code, add the text of the LICENSE.txt file as a comment to your code or on some „Acknowledgements“ page to ensure legal compliance.
Instead of looking at the Storybook and copying code from there, you can also visit this link which will redirect you to the TinyMCE docs for now which provide detailed reference. But, note that we have changed some props: Please view the changelog. Additionally, contrary to what this page says in regard to bundling TinyMCE, we explicitly recommend you to bundle HugeRTE following our docs.
- Replace
tinymce
byhugerte
(@tinymce/tinymce-react
to@hugerte/hugerte-react
). - Review the changed props in the changelog.
Have you found an issue with hugerte-react
or do you have a feature request? Open up an issue and let us know or submit a pull request. Note: for issues related to HugeRTE itself please visit the HugeRTE repository.