Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/worldpwn/tiptap-custom-link-vue-router
Example of custom tiptap v2 link that is using vue router
https://github.com/worldpwn/tiptap-custom-link-vue-router
Last synced: about 16 hours ago
JSON representation
Example of custom tiptap v2 link that is using vue router
- Host: GitHub
- URL: https://github.com/worldpwn/tiptap-custom-link-vue-router
- Owner: worldpwn
- Created: 2021-12-18T17:46:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-21T15:11:41.000Z (over 1 year ago)
- Last Synced: 2024-10-11T23:17:51.433Z (4 months ago)
- Language: TypeScript
- Size: 332 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-tiptap - tiptap-custom-link-vue-router
- awesome-tiptap - tiptap-custom-link-vue-router
README
# tiptap-custom-link-vue-router
Example of custom [tiptap v2](https://github.com/ueberdosis/tiptap) link that is using vue router.
I use it in [LoreHub](https://LoreHub.app)
## Demo
![alt text](./docs-images/link-to-document.gif)
It will generate this HTML code:
![](./docs-images/html.png)## Usage in code
``` javascript
// add link
this.editor
.chain()
.focus()
.extendMarkRange("link")
.setDocumentLink({ href: documentId })
.run();// remove link
this.editor
.chain()
.focus()
.unsetDocumentLink()
.run();
```