mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
12 lines
367 B
TypeScript
12 lines
367 B
TypeScript
import { useEffect } from "react";
|
|
import { registerCodeHighlighting } from "@lexical/code";
|
|
import { useLexicalComposerContext } from "@lexical/react/LexicalComposerContext";
|
|
|
|
export const CodeHighlightPlugin = () => {
|
|
const [editor] = useLexicalComposerContext();
|
|
useEffect(() => {
|
|
return registerCodeHighlighting(editor);
|
|
}, [editor]);
|
|
return null;
|
|
};
|