Components
Code Block Element
Code Block Element
Displays a code block with syntax highlighting, language selection, and copy functionality.
API ReferenceBlock Context MenuBlock MenuBlock SelectionButtonColor Dropdown MenuCommandDialogDropdown MenuInputMenuPlate ElementPopoverToolbarTooltipTurn Into Dropdown Menu
Installation
Install the following dependencies:
npm install @udecode/plate-code-block prismjs @udecode/plate-selection @udecode/plate-caption @udecode/plate-font @udecode/plate-media @radix-ui/react-toolbar @radix-ui/react-dropdown-menu @udecode/plate-block-quote @udecode/plate-callout @udecode/plate-heading @udecode/plate-indent-list @udecode/plate-toggle @ariakit/[email protected] @radix-ui/react-slot @radix-ui/react-tooltip @radix-ui/react-popover @radix-ui/react-dialog