Skip to content

Commit a79313b

Browse files
committed
fix
1 parent 4e2baf1 commit a79313b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/www/src/registry/components/editor/transforms.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import type { PlateEditor } from 'platejs/react';
44

55
import { insertCallout } from '@platejs/callout';
6-
import { insertCodeBlock } from '@platejs/code-block';
6+
import { insertCodeBlock, toggleCodeBlock } from '@platejs/code-block';
77
import { insertDate } from '@platejs/date';
88
import { insertColumnGroup, toggleColumnGroup } from '@platejs/layout';
99
import { triggerFloatingLink } from '@platejs/link/react';
@@ -128,6 +128,7 @@ const setBlockMap: Record<
128128
[KEYS.ol]: setList,
129129
[KEYS.ul]: setList,
130130
[ACTION_THREE_COLUMNS]: (editor) => toggleColumnGroup(editor, { columns: 3 }),
131+
[KEYS.codeBlock]: (editor) => toggleCodeBlock(editor),
131132
};
132133

133134
export const setBlockType = (

0 commit comments

Comments
 (0)