Skip to content

Commit

Permalink
fix: documentation for defaultLanguage setting in the CodeBlock e…
Browse files Browse the repository at this point in the history
…xtension (#54)
  • Loading branch information
AbhayVAshokan authored Nov 20, 2024
1 parent a874598 commit 45403ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-ladybugs-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tiptap-docs': patch
---

Added documentation for `defaultLanguage` setting in the `CodeBlock` extension.
12 changes: 12 additions & 0 deletions src/content/editor/extensions/nodes/code-block.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ CodeBlock.configure({
})
```

### defaultLanguage

Define a default language instead of the automatic detection of lowlight.

Default: `null`

```js
CodeBlock.configure({
defaultLanguage: 'plaintext',
})
```

### exitOnArrowDown

Define whether the node should be exited on arrow down if there is no node after it.
Expand Down

0 comments on commit 45403ac

Please sign in to comment.