Adds WikiLinks (e.g.,[[Related Document]]
).
See the demo at /example
for a quick introduction on how to use this package.
There is currently no npmjs.org
package published, but meanwhile, this extension can also be quickly installed from GitHub directly using npm
.
For example, it can be installed using gitpkg.now.sh using the command npm install 'https://gitpkg.now.sh/aarkue/tiptap-wikilink-extension/packages/tiptap-wikilink-extension?main'
and then cd
ing into the node_modules/... folder and running npm install
and npm run build
.
onWikiLinkClick
: Is executed when a WikLink is clicked on. Type:(id: string, name: string, event: MouseEvent) => any
renderSuggestionFunction
: Should render the suggestions based on the inputtext
inside the elementelement
. This can be done with vanilla javascript or, e.g.,react-dom
. Type:(element: HTMLElement, text: string, editor: Editor, range: { from: number; to: number }) => any
Try out the demo directly online at https://aarkue.github.io/tiptap-wikilink-extension/!