feat: Allow individual Typography rules to be disabled (#2449)

This commit is contained in:
Ricardo Amaral
2022-02-04 09:14:00 +00:00
committed by GitHub
parent 88ef8eabb0
commit 7ce6687184
2 changed files with 133 additions and 24 deletions

View File

@@ -49,3 +49,23 @@ npm install @tiptap/extension-typography
## Usage
https://embed.tiptap.dev/preview/Extensions/Typography
### Disabling rules
You can configure the included rules, or even disable a few of them, like shown below.
```js
import { Editor } from '@tiptap/core'
import Typography from '@tiptap/extension-typography'
const editor = new Editor({
extensions: [
// Disable some included rules
Typography.configure({
oneHalf: false,
oneQuarter: false,
threeQuarters: false,
}),
],
})
```