UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

17 lines (16 loc) 541 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const react_1 = require("react"); const LexicalComposerContext_1 = require("@lexical/react/LexicalComposerContext"); const ApiPlugin = (props, ref) => { // HOOKS const [editor] = (0, LexicalComposerContext_1.useLexicalComposerContext)(); // EXPOSED METHODS (0, react_1.useImperativeHandle)(ref, () => ({ focus: () => { editor.focus(); } })); return null; }; exports.default = (0, react_1.forwardRef)(ApiPlugin);