mirror of
https://github.com/davidkaya/aryx.git
synced 2026-12-04 14:16:24 +01:00
feat: enable Prism-based syntax highlighting in code blocks
- Register CodeHighlightNode in the editor node set - Add CodeHighlightPlugin that calls registerCodeHighlighting - Map codeHighlight theme keys to mc-tok-* CSS classes - Add dark-theme token colors for 20+ Prism token types Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
38d7e339a2
commit
8240468d1e
3 files changed
+68
-2
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { CodeNode } from '@lexical/code';
|
||||
import { CodeHighlightNode, CodeNode } from '@lexical/code';
|
||||
import { AutoLinkNode, LinkNode } from '@lexical/link';
|
||||
import { type Transformer, TRANSFORMERS } from '@lexical/markdown';
|
||||
import { ListItemNode, ListNode } from '@lexical/list';
|
||||
@@ -38,6 +38,7 @@ export const markdownEditorNodes: ReadonlyArray<Klass<LexicalNode>> = [
|
||||
LinkNode,
|
||||
AutoLinkNode,
|
||||
CodeNode,
|
||||
CodeHighlightNode,
|
||||
];
|
||||
|
||||
export const markdownEditorTransformers: ReadonlyArray<Transformer> = TRANSFORMERS;
|
||||
|
||||
Reference in new issue
Block a user