-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to Note Block #1021
Comments
Yes, it will be really nice feature |
So Obsidian just did this - linking to headers. Might be something good to draw inspiration from! |
To give here some response - while this is a valid feature request, it's quite a bit more complex than one could guess from outside. So don't get your hopes up, it's probably not coming in near or medium term future. |
@zadam Thanks for your response, and keep up the great work! |
One thing which I've been concerned about is the paragraph link "stability" - paragraphs are added/removed, renamed, copy pasted etc. and it's not easy to make sense of the persistent identity of the paragraph. One promising solution I noticed in some editors is making anchors an explicit object. Unfortunately, CKEditor 5 does not support this feature, although there is a considerable interest. I think once this is added, we should be able to add support for linking such anchors into Trilium. |
@zadam As you already mentioned, I don't know the insides of the editor, only the outside which I use. It is already possible in Trilium to change the type of "paragraph", e.g. to header or list item or such, using the icon in front of the paragraph. Would it be possible to auto-generate an anchor tag with a unique ID on paragraph creation? E.g. when I type "Enter" in the editor, a new line opens up and the editor automatically generates the anchor tag. Then it doesn't matter what the type of the paragraph is as long as the anchor tag stays with it (that might be not so easy to implement). However, this would probably allow adding, removing, renaming, etc. to work as expected. |
Could it be possible to dynamically resolve the link, rather than waiting on some sort of feature from CKEditor for this? A (perhaps not perfect, but good) idea could be to limit links to headers. A link would be created from existing headers, and then when the link is followed, the front-end could dynamically evaluate the current headers into a slug and see if any of them match the link provided. If none match, a pop-up notice could be shown to the user that the link is out of date and suggest they fix it (and then just leave the view at top of the note, as normally done). I think this is similar to how a lot of web tools work for markdown headers. Anchors are automatically created from headers in a slug style (i.e. "This is a header" would become an anchor Just my $0.02 |
Seems reasonable. What about duplicate heading matches? Would we just link to the first one in the document? |
Hmm, maybe append the slug with |
The problem with the auto-generated anchors is that they are extremely fragile - a simple rewording/typo will break the link. IMHO a much better solution is to explicitly create an anchor which will be stable, but that needs some CKEditor support. |
How about do something first, then try to improve it when there is another progress.....The internal links generated by the function "copy link to this paragraph" in Onenote sometimes will become dead, but it is still a good way to make connections between notes. Is it possible and good to use creating-time to identify paragraph in CKEditor or Trilium? Then use note-id and paragraph-creating-time to generate internal links? |
@zadam ? |
Fwiw, I think if an idea in a note is worth linking to, it seems worth extracting to its own note, and then just linking the note. Similar principles for modularity apply for note-taking as it does for programming. |
@nymation As trilium supports publishing of whole document trees I currently use it as a form of wiki for work where I publish public articles as a form of technical wiki so I see the use case for a paragraph Link feature. |
Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: TriliumNext/Notes#108 |
I was a long time user of Onenote but finally made the migration to Trilium and have absolutely no regrets - Thanks @zadam for an impressive piece of software!
The only feature that i find myself missing quite often from OneNote is the option to link to a specific internal paragraph. I've learned to work around this for now, but I think it would be a welcome feature. Even if it wasn't possible via the Ctrl-L menu, it would be nice to be able to "Copy Trilium link to paragraph" or something similar to provide some more fine-grained internal linking.
The text was updated successfully, but these errors were encountered: