UNPKG

@yuntijs/ui

Version:

☁️ Yunti UI - an open-source UI component library for building Cloud Native web apps

13 lines 554 B
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray"; import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'; import { useImperativeHandle } from 'react'; export var EditorRefPlugin = function EditorRefPlugin(_ref) { var editorRef = _ref.editorRef; var _useLexicalComposerCo = useLexicalComposerContext(), _useLexicalComposerCo2 = _slicedToArray(_useLexicalComposerCo, 1), editor = _useLexicalComposerCo2[0]; useImperativeHandle(editorRef, function () { return editor; }); return null; };