mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-07 17:43:49 +08:00
docs: update content
This commit is contained in:
parent
7ea55279a3
commit
077f726f27
@ -259,7 +259,7 @@ new Editor({
|
|||||||
```
|
```
|
||||||
|
|
||||||
### enableInputRules
|
### enableInputRules
|
||||||
By default, Tiptap enables all [input rules](/guide/custom-extensions/#input-rules). With `enableInputRules` you can disable that.
|
By default, Tiptap enables all [input rules](/guide/custom-extensions/#input-rules). With `enableInputRules` you can control that.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { Editor } from '@tiptap/core'
|
import { Editor } from '@tiptap/core'
|
||||||
@ -274,8 +274,27 @@ new Editor({
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively you can allow only specific input rules.
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { Editor } from '@tiptap/core'
|
||||||
|
import StarterKit from '@tiptap/starter-kit'
|
||||||
|
import Link from '@tiptap/extension-link'
|
||||||
|
|
||||||
|
new Editor({
|
||||||
|
content: `<p>Example Text</p>`,
|
||||||
|
extensions: [
|
||||||
|
StarterKit,
|
||||||
|
Link,
|
||||||
|
],
|
||||||
|
// pass an array of extensions or extension names
|
||||||
|
// to allow only specific input rules
|
||||||
|
enableInputRules: [Link, 'horizontalRule'],
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
### enablePasteRules
|
### enablePasteRules
|
||||||
By default, Tiptap enables all [paste rules](/guide/custom-extensions/#paste-rules). With `enablePasteRules` you can disable that.
|
By default, Tiptap enables all [paste rules](/guide/custom-extensions/#paste-rules). With `enablePasteRules` you can control that.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
import { Editor } from '@tiptap/core'
|
import { Editor } from '@tiptap/core'
|
||||||
@ -290,6 +309,25 @@ new Editor({
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively you can allow only specific paste rules.
|
||||||
|
|
||||||
|
```js
|
||||||
|
import { Editor } from '@tiptap/core'
|
||||||
|
import StarterKit from '@tiptap/starter-kit'
|
||||||
|
import Link from '@tiptap/extension-link'
|
||||||
|
|
||||||
|
new Editor({
|
||||||
|
content: `<p>Example Text</p>`,
|
||||||
|
extensions: [
|
||||||
|
StarterKit,
|
||||||
|
Link,
|
||||||
|
],
|
||||||
|
// pass an array of extensions or extension names
|
||||||
|
// to allow only specific paste rules
|
||||||
|
enablePasteRules: [Link, 'horizontalRule'],
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
### injectCSS
|
### injectCSS
|
||||||
By default, Tiptap injects [a little bit of CSS](https://github.com/ueberdosis/tiptap/tree/main/packages/core/src/style.ts). With `injectCSS` you can disable that.
|
By default, Tiptap injects [a little bit of CSS](https://github.com/ueberdosis/tiptap/tree/main/packages/core/src/style.ts). With `injectCSS` you can disable that.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user