123
This commit is contained in:
@ -47,7 +47,7 @@ export function CourseEditor({ content, onChange }: CourseEditorProps) {
|
||||
StarterKit.configure({
|
||||
heading: { levels: [1, 2, 3] },
|
||||
codeBlock: {
|
||||
HTMLAttributes: (node) =>
|
||||
HTMLAttributes: (node: { attrs: { language?: string } }) =>
|
||||
node.attrs.language === 'mermaid'
|
||||
? { class: 'mermaid rounded-lg p-4 bg-muted min-h-[80px]', 'data-language': 'mermaid' }
|
||||
: { class: 'rounded-lg bg-muted p-4 font-mono text-sm', 'data-language': node.attrs.language || '' },
|
||||
|
||||
Reference in New Issue
Block a user