Syntax to link notes

And also need a way to rename note titles. When you reference notes by id, there is no need to change the links when you rename a note. However, if the links are based on the note title, if you rename the note, you should also rename the references.

Or: you could continue using note ids for the syntax, but have autocomplete based on the Note titles.

3 Likes

Notebooks and notes both use IDs in the code, but the Notebook one in the code is sorely underused from what I could tell in my brief time working with that particular part of if.

1 Like

I think it is also important that the result is link in markdown code to not have a proprietary solution.

1 Like

As I now use Joplin also for my worklife there are some features I want to ask for.

So this time its about the joplin-internal markdown links: Very often I want to link different notes while Iā€™m writing.

To make this easier I want to propose the following idea. Similar to the link toolbar button the user gets an interface to put in the name for the markdown link but instead of the link input field there would be a search field similar to the go to-function and so I can select a note to be behind the markdown link.

8 Likes

If you export to markdown, the links will be okay :+1:

Curious what @laurent position is on this proposal

1 Like

Really in favor of this. I love Zettlr as a platform, but the lack of android app (and some other small things, like nextcloud support) makes it hard to use as a true Zettelkasten

3 Likes

Have been using Zettlr now for some time and can say, that I love it, too.

The difference between Joplin as a notebook or a CMS has been discussed here on the forum. Many things make Z. a much more fluent and distraction-free an app for actual writing, at the current stage of development. The basic NC-sync is enough for quickly collecting new zettels on Android to be imported to Zettlr on desktop. Joplin, on the other hand, acts better as a personal notebook for non-strictly-for-writing-projects-confined bits and pieces.

However, I would like to see backlinks featuring also in Joplin (reckon Zettlr is going to implement bidirectional links, soon). Discussed also in here very recently.

1 Like

Iā€™m not really a techie (at all), so a lot of this dev talk here goes over my head. But I spent a lot of time searching for a solution that does just this.

Iā€™ve been using Joplin as a Zettle, and the work of manually keeping every note in mind and syncing them together defeats the purpose. I wish this bi-directional linking like in Zettlr or Roam would work.

Just throwing another vote of support for this idea!

4 Likes

curious to see if I can lure @laurent and/or @tessus in the conversation?

1 Like

We had this discussion a few times before. Itā€™s also on my wishlist, but there are so many other things to tackle first.

My solution would look like this: when you typed [[ a popup next to the cursor would appear and you could search for a note (similar to the goto anything element - or actually we could even use the same code). Then the [[ would be replaced by the proper link [note title](:/hash).

19 Likes

I think that sums it up, except that I think a cross-reference or reverse-link should be added to the note that is referenced. The cross-reference ( in the similar [note title](:/hash) format ) would become prepended to the existing body, allowing for intuitive navigation

1 Like

I am against changing a noteā€™s body. Also a not could be referenced from many notes. An extreme example, but do you want 100 lines at the beginning of the note, if that note is referenced from 100 other notes?
However, should backlinks ever be considered, there are a few options where to show them:

  • notes properties
  • status line (which does not yet exist)

Btw, you can use the Back button to go back to the previous note. (This wonā€™t work of course, if you go directly to the note that has one ore more backlinks.

image

Otherwise there could be a setting that would allow adding a backlink to the body. But I remember that Laurent is not too keen when it comes to adding settings.

1 Like

I suppose it can be done without touching a note body. Something like this:

  • add a table to store notes' links much like there's a table for note-resource links already
  • when rendering a note add a section (for example at the bottom) "Notes linking here" and put a list of notes from the database.

Not sure how this can work with WYSIWYG and it won't work with an external editor for sure.

Can be at the end or maybe made collapsable. Or floating like someone here on the forum made a floating TOC.

1 Like

That's an interesting thought...

Possible the navigation / tags bar could host a (autocomplete ) dropdown menu, that list notes linked to the current one

5 Likes

My solution would look like this: when you typed [[ a popup next to the cursor would appear and you could search for a note (similar to the goto anything element - or actually we could even use the same code). Then the [[ would be replaced by the proper link [note title](:/hash) .

So uh, I've actually been working on this because I hate having to use my mouse to link to other notes. Short video showing this off. AceEditor and TinyMCE both have built in auto-complete. I have something working with AceEditor but boy was it a headache to get working since the feature/extension isn't documented at all with Ace. I haven't started with TinyMCE yet.

Edit: Here is a gist with the code to make it happen. I could PR this but I had to make some changes and pull react-ace's version up to a more recent one and drop brace and switch for ace-builds, due to some changes they made in the project. The app loads fine but I have no idea if jumping ahead like 2 major versions on react-ace has broken anything. I literally just got this auto-complete working today.

13 Likes

Very cool! This could maybe even hook into the new search system that is being developed.

While weā€™re talking about linking notes, I have another thought. Would it be possible to update the link text/alt text if the title of the linked note is modified? Obviously this only works if no custom name to the link is given.

For larger projects, I often use separate notes for different sections and an ā€œoverviewā€ note. Having to update the links manually is kind of a pain.

2 Likes

This looks fantastic!

One thing though - isnā€™t AceEditor is going to be replaced with CodeMirror?

Thanks for looking into it but please keep in mind that we might drop Ace Editor in favour of Code Mirror at some point (maybe sooner than I thought), so it might be best and even easier to get it working on Code Mirror instead.

1 Like

Ah ok, I didn't know this. After the little work I did with Ace Editor and looking at the docs for Code Mirror, I can see why this might be happening. Is there a branch where Code Mirror is the default editor and can be worked on? It probably wouldn't be hard to add this autocomplete feature to it (they even have documentation! :slight_smile:) , but I would need to mess around to get it working.

4 Likes