text
text copied to clipboard
Outline view of headings for quick navigation (table of contents)
Here’s some examples of how other apps use headings to automatically create an outline for quick navigation. This is always shown on the left and we could do that too.
Dropbox Paper
Very nicely designed, non-obtrusive by default, with h1 and h2 levels highlighted on the left:
https://blog.dropbox.com/topics/product-tips/paper-hidden-gems

Google Drive
h1 and h2 are shown normally, and it seems starting with h3 they are indented:

FoldingText

I was just looking around for an issue mentioning a better overview of headlines and stumbled over this. Great idea!
like this too!
Any idea if this still considered and how one can try to help?
This idea is great and would make the Collectives app even better!
As a complement (or maybe it would be a workaround?), it would be great to make sections collapsible (https://github.com/nextcloud/text/issues/1841)
I would love seeing this feature implemented. I use nextcloud text a lot and this would help declutter long notes.
We can actually add any mature Wiki-Software to the list of apps which have this feature, including Gitlab markdown-pages and perhaps Github. Comparison with Wiki-Software is perhaps a bit unfair if we look at the text-app alone. However, as the Nextcloud-Wiki app, which calls itself "collectives", is using "text"-app as backend it seems that many features yet missing from the collectives can only be implemented if they are also present in the text app. Besides TOC and general inter-page links (links to headings in the same document and to headings in other documents) also foot-notes come into my mind.
Comparison with wiki may be unfair, but comparison with other collaborative editing tools may not be that unfair. This features (TOC visibility and direct access to section through it) is a very common and almost essential features of any collaborative editing tool such as Hedgedoc, OnlyOffice or Collabora Online.
As I said I really think this feature is a must-be and I would like to help it exist.
Any idea where to begin?
Comparison with wiki may be unfair, but comparison with other collaborative editing tools may not be that unfair. This features (TOC visibility and direct access to section through it) is a very common and almost essential features of any collaborative editing tool such as Hedgedoc, OnlyOffice or Collabora Online.
I also would very much like to have such a feature. I like the integration of kind-of-a-wiki into Nextcloud, and of course also the collaborative features. It is little bit sad that inter-page linking is not yet implemented.
I wonder if it would maybe easier to start with linking to headings inside pages and build the automatic TOC on top of that? Clearly the TOC wants to link to the headings in the document, so it needs support for hyper-links pointing to anchors in the same document. If these inside-page links are there (including of course that the editor jumps to the linked-to heading) then building the top would just be a matter of parsing the document and collecting the headings.
I am not involved in the development of "text", so I do not really no where to start.
Comparison with wiki may be unfair, but comparison with other collaborative editing tools may not be that unfair. This features (TOC visibility and direct access to section through it) is a very common and almost essential features of any collaborative editing tool such as Hedgedoc, OnlyOffice or Collabora Online.
I also would very much like to have such a feature. I like the integration of kind-of-a-wiki into Nextcloud, and of course also the collaborative features. It is little bit sad that intra-page linking is not yet implemented. Actually, linking to headings inside documents, including the current one, i.e. linking to HTML-anchors (ok, its markup, but when it is finally rendered in the web-browser the task is to link to HTML anchors)
I wonder if it would maybe easier to start with linking to headings inside pages and build the automatic TOC on top of that? Clearly the TOC wants to link to the headings in the document, so it needs support for hyper-links pointing to anchors in the same document. If these inside-page links are there (including of course that the editor jumps to the linked-to heading) then building the TOC would just be a matter of parsing the document and collecting the headings.
I am not involved in the development of "text", so I do not really no where to start.
As I said I really think this feature is a must-be and I would like to help it exist. Any idea where to begin?
Contributions in this area are of course very welcome. Let me try to summarise the necessary steps there a bit:
As we recently switched to tiptap v2 as the library being used for the editor, I think having a first look at the table of contents implementation in the documentation would be a good start:
https://tiptap.dev/guide/node-views/examples#table-of-contents
This should be adaptable to the text app, to be more specific in https://github.com/nextcloud/text/blob/master/src/components/EditorWrapper.vue where the actual editor instance is being used.
UI wise this would need to be implemented a bit differently, so that there is not a TOC node at the beginning of the document but it is a separate UI element next to the actual content.
If you have any further questions or need additional help, let us know.
Seems like this is highly desired right now. Is anyone currently working on a branch for this? If not, I am willing to tackle #2173 first over the weekend, then perhaps this issue as well.