UNPKG

strapi-html-editor

Version:

Presenting an alternative to standard wysiwyg editor in Strapi in the form of this HTML-editor that facilitates easier and hussle-free data customization to use with various frontends.

27 lines (20 loc) 417 B
/** * * Initializer * */ import { useEffect, useRef } from 'react'; import PropTypes from 'prop-types'; import pluginId from '../../pluginId'; const Initializer = ({ setPlugin }) => { const ref = useRef(); ref.current = setPlugin; useEffect(() => { ref.current(pluginId); }, []); return null; }; Initializer.propTypes = { setPlugin: PropTypes.func.isRequired, }; export default Initializer;