tree-view.tsx 655 B

12345678910111213141516171819
  1. import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
  2. import { TreeView } from '@lexical/react/LexicalTreeView'
  3. const TreeViewPlugin = () => {
  4. const [editor] = useLexicalComposerContext()
  5. return (
  6. <TreeView
  7. viewClassName="tree-view-output"
  8. treeTypeButtonClassName="debug-treetype-button"
  9. timeTravelPanelClassName="debug-timetravel-panel"
  10. timeTravelButtonClassName="debug-timetravel-button"
  11. timeTravelPanelSliderClassName="debug-timetravel-panel-slider"
  12. timeTravelPanelButtonClassName="debug-timetravel-panel-button"
  13. editor={editor}
  14. />
  15. )
  16. }
  17. export default TreeViewPlugin