Skip to content

CodeBlock

Usage

tsx
import { CodeBlock } from 'reactjs-tiptap-editor/codeblock'; 

import 'prism-code-editor-lightweight/layout.css'; 
import 'prism-code-editor-lightweight/themes/github-dark.css'; 

const extensions = [
  ...,
  // Import Extensions Here
  CodeBlock, 
];
  • You can write ```, press Enter, and write some code! It loads the language on the fly.

Source

SourceDocs

Contributors

Changelog

No recent changes

Made with ❤️