From 2ebed3054f6b81f82035a0992619016754797535 Mon Sep 17 00:00:00 2001 From: Hans Pagel Date: Sat, 10 Jul 2021 23:56:29 +0200 Subject: [PATCH] docs: update link demo, fix #1564 --- docs/src/demos/Marks/Link/index.vue | 7 ++++++- docs/src/docPages/api/marks/link.md | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/src/demos/Marks/Link/index.vue b/docs/src/demos/Marks/Link/index.vue index dc3a0db73..d11b80fcc 100644 --- a/docs/src/demos/Marks/Link/index.vue +++ b/docs/src/demos/Marks/Link/index.vue @@ -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() }, }, diff --git a/docs/src/docPages/api/marks/link.md b/docs/src/docPages/api/marks/link.md index 8a94d2078..c938b82ba 100644 --- a/docs/src/docPages/api/marks/link.md +++ b/docs/src/docPages/api/marks/link.md @@ -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 - +