Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Adding support for [[double bracket]] internal links #277

Answered by tommoor
haveanicedavid asked this question in General
Discussion options

You must be logged in to vote

Hi, I'd be interested in accepting a PR for this shortcut.

There's an existing onCreateLink callback, so you'd want to hook into this to create/find the link based on the text between the brackets. You can search the codebase to see how this is used currently from the LinkToolbar.

The bracket matching can be done with an additional input rule:
https://github.com/outline/rich-markdown-editor/blob/develop/src/marks/Link.ts#L64

I'd hope that all of the associated logic could be contained within the Link mark file.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by haveanicedavid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants