mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 15:49:23 +08:00
docs: update link demo, fix #1564
This commit is contained in:
parent
d466371d7e
commit
2ebed3054f
@ -53,7 +53,12 @@ export default {
|
||||
setLink() {
|
||||
const url = window.prompt('URL')
|
||||
|
||||
this.editor.chain().focus().setLink({ href: url }).run()
|
||||
this.editor
|
||||
.chain()
|
||||
.focus()
|
||||
.extendMarkRange('link')
|
||||
.setLink({ href: url })
|
||||
.run()
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -40,4 +40,4 @@ This extension doesn’t bind a specific keyboard shortcut. You would probably o
|
||||
[packages/extension-link/](https://github.com/ueberdosis/tiptap/blob/main/packages/extension-link/)
|
||||
|
||||
## Usage
|
||||
<demo name="Marks/Link" highlight="3-8,19,38,55" />
|
||||
<demo name="Marks/Link" highlight="3-8,18,39,56-61" />
|
||||
|
Loading…
Reference in New Issue
Block a user