feat: Add support for autolink (#2226)

* wip

* WIP

* add autolink implementation

* refactoring

* set keepOnSplit to false

* refactoring

* improve changed ranges detection

* move some helpers into core

Co-authored-by: Philipp Kühn <philippkuehn@MacBook-Pro-von-Philipp.local>
This commit is contained in:
Philipp Kühn
2021-12-03 08:53:58 +01:00
committed by GitHub
parent 40a9404c94
commit 3d68981b47
15 changed files with 366 additions and 82 deletions

View File

@@ -20,14 +20,14 @@ npm install @tiptap/extension-link
## Settings
### HTMLAttributes
Custom HTML attributes that should be added to the rendered HTML tag.
### autolink
If enabled, it adds links as you type.
Default: `true`
```js
Link.configure({
HTMLAttributes: {
class: 'my-custom-class',
},
autolink: false,
})
```
@@ -53,6 +53,16 @@ Link.configure({
})
```
### HTMLAttributes
Custom HTML attributes that should be added to the rendered HTML tag.
```js
Link.configure({
HTMLAttributes: {
class: 'my-custom-class',
},
})
```
## Commands