docs: update content
This commit is contained in:
@@ -19,6 +19,11 @@ import CodeBlockComponent from './CodeBlockComponent'
|
||||
// install all highlight.js languages
|
||||
import 'lowlight'
|
||||
|
||||
// or install specific languages only
|
||||
// import lowlight from 'lowlight/lib/core'
|
||||
// import javascript from 'highlight.js/lib/languages/javascript'
|
||||
// lowlight.registerLanguage('javascript', javascript)
|
||||
|
||||
export default {
|
||||
components: {
|
||||
EditorContent,
|
||||
|
||||
@@ -18,6 +18,11 @@ import CodeBlockLowlight from '@tiptap/extension-code-block-lowlight'
|
||||
// install all highlight.js languages
|
||||
import 'lowlight'
|
||||
|
||||
// or install specific languages only
|
||||
// import lowlight from 'lowlight/lib/core'
|
||||
// import javascript from 'highlight.js/lib/languages/javascript'
|
||||
// lowlight.registerLanguage('javascript', javascript)
|
||||
|
||||
export default {
|
||||
components: {
|
||||
EditorContent,
|
||||
|
||||
@@ -6,10 +6,6 @@ With the CodeBlock extension you can add fenced code blocks to your documents. I
|
||||
|
||||
Type <code>``` </code> (three backticks and a space) or <code>∼∼∼ </code> (three tildes and a space) and a code block is instantly added for you. You can even specify the language, try writing <code>```css </code>. That should add a `language-css` class to the `<code>`-tag.
|
||||
|
||||
::: warning Restrictions
|
||||
The CodeBlock extension doesn’t come with styling and has no syntax highlighting built-in. It’s on our roadmap though.
|
||||
:::
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
# with npm
|
||||
|
||||
Reference in New Issue
Block a user