This repository has been archived by the owner on Jan 20, 2022. It is now read-only.
Replies: 1 comment 1 reply
-
Hey, as expressed in the previous comment you linked I think this logic can all be attached to the existing You might also consider the double bracket syntax and the "display internal links differently" as separate features which will help with development. For the later we could introduce a new callback prop that allows the editor to ask the parent application if a link is considered "internal" when rendering it. thoughts? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to implement the double bracket para syntax for internal linking:
[[note1]], [[note2]] etc
where note1 is the id of the note. On clicking the note the editor will load it's contents.What I want to achieve is different styling for internal and external links, and adding different icons for external and internal links. Thus, I need to add a different mark and cannot reuse the strategy discussed in Adding support for [[double bracket]] internal links #277.
Moreover, having the two links styled differently will make syntactical sense and the resulting notes will be compatible with other tools that support the
[[]]
syntax such as Roam Research, Obsidian, etc.I started with duplicating the Link mark and reusing it as a
para
mark. However, I realized that the parsing and mark logic is very specific and I could not find guides on what the regex and different parameters are for.Can someone provide pointers on how to implement a custom mark?
Perhaps a tutorial on adding a custom mark will make it easier to extend the editor for generic usage.
Beta Was this translation helpful? Give feedback.
All reactions