mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 08:46:22 +02:00
24 lines
602 B
TypeScript
24 lines
602 B
TypeScript
|
|
import {
|
||
|
|
BaseCodeBlockPlugin,
|
||
|
|
BaseCodeLinePlugin,
|
||
|
|
BaseCodeSyntaxPlugin,
|
||
|
|
} from '@platejs/code-block';
|
||
|
|
import { all, createLowlight } from 'lowlight';
|
||
|
|
|
||
|
|
import {
|
||
|
|
CodeBlockElementStatic,
|
||
|
|
CodeLineElementStatic,
|
||
|
|
CodeSyntaxLeafStatic,
|
||
|
|
} from '@/components/ui/code-block-node-static';
|
||
|
|
|
||
|
|
const lowlight = createLowlight(all);
|
||
|
|
|
||
|
|
export const BaseCodeBlockKit = [
|
||
|
|
BaseCodeBlockPlugin.configure({
|
||
|
|
node: { component: CodeBlockElementStatic },
|
||
|
|
options: { lowlight },
|
||
|
|
}),
|
||
|
|
BaseCodeLinePlugin.withComponent(CodeLineElementStatic),
|
||
|
|
BaseCodeSyntaxPlugin.withComponent(CodeSyntaxLeafStatic),
|
||
|
|
];
|