diff --git a/docs/src/demos/Extensions/Link/index.spec.js b/docs/src/demos/Extensions/Link/index.spec.js new file mode 100644 index 00000000..dee73154 --- /dev/null +++ b/docs/src/demos/Extensions/Link/index.spec.js @@ -0,0 +1,12 @@ +context('/api/extensions/link', () => { + before(() => { + cy.visit('/api/extensions/link') + }) + + beforeEach(() => { + cy.get('.ProseMirror').then(([{ editor }]) => { + editor.setContent('

Example Text

') + editor.selectAll() + }) + }) +}) \ No newline at end of file diff --git a/docs/src/demos/Extensions/Link/index.vue b/docs/src/demos/Extensions/Link/index.vue new file mode 100644 index 00000000..2f0b9e95 --- /dev/null +++ b/docs/src/demos/Extensions/Link/index.vue @@ -0,0 +1,46 @@ + + + \ No newline at end of file diff --git a/docs/src/docPages/api/extensions/link.md b/docs/src/docPages/api/extensions/link.md index a9844c09..b89605a9 100644 --- a/docs/src/docPages/api/extensions/link.md +++ b/docs/src/docPages/api/extensions/link.md @@ -15,3 +15,18 @@ yarn add @tiptap/extension-link | ----------- | ------- | ------- | -------------------------------------------- | | class | string | – | Add a custom class to the rendered HTML tag. | | openOnClick | Boolean | true | Specifies if links will be opened on click. | + +## Commands +| Command | Options | Description | +| ------- | ------- | ----------------------- | +| link | — | Link the selected text. | + +## Keyboard shortcuts +* Windows & Linux: `Control` + `K` +* macOS: `Command` + `K` + +## Source code +[packages/extension-link/](https://github.com/ueberdosis/tiptap-next/blob/main/packages/extension-link/) + +## Usage + \ No newline at end of file