zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
26.15k stars 1.79k forks source link

Extension of "CutIntoNote" / "cut & paste selection to subnote" feature #3107

Open sharpeagle2022 opened 1 year ago

sharpeagle2022 commented 1 year ago

Describe feature

1st of all, congrats for this cool piece of software! Versatile and with great potential!

Now, related to the feature request, since there's no ability to link to paragraphs/headings (as in other note taking tools; and probably not planned mid-term), the only way one can mimic this ability is by creating sub-notes from paragraphs using "CutIntoNote" and then being able to link these notes in the parent note to create a meaningful structure or into other notes. But this has a drawback in terms of functionality, since it is basically a cut, create note and paste operation, without keeping a reference at initial localtion of the text moved into subnote. Because the idea is not just about cutting a note into pieces. but there is also the conext where one wants to keep the parent note and have its contents built out of the contents of all subnotes, by inserting the sunbotes one by one, as references (to see the full picture). Currently, achieving this takes time and a lot of focus in order to insert the child notes and their correct order....

So, I propose to have this feature splitted in two:

  1. As currently implemented (CutIntoNote - text moved from note into child note)
  2. CutIntoNote + AddIncludeNoteToText in the same operation (eg replacing the selected text with an instantiation/reference of child-note where the text has been moved)

Of course, the parent note wil not have the ToC automatically created anymore on the right side, but this ToC can be now thought as being the structure of the note itself, from the tree view (with numbering the titles of subnotes and sorting them).

Thanks!

PS: btw, can this paragraph/header linking feature be more easily introduced (because I understood from another feature request that it's complicated to develop this kind of links) by introducing the concept of "pseudo-notes" or hidden notes? Meaning: they are still notes enitites (subnotes), are still create as in "CutIntoNote", but they are not displayed in the tree-view but instead created as in 2. above. And still can still be referenced when searching for them, bookmarked, shared etc.

The only problem is with editing, but I'm sure this can be resolved with a contextual button that creates a frame inside the parent note and displays the hidden subnote in edit mode, keeping the ability for the subnote to have attributes/tags also (plus those automatically inherited from the parent-note, but probably only a subset).

Additional Information

No response

salmund commented 1 year ago

https://github.com/salmund/trilium_better_include/tree/main