Since Disco TOC is one of the theme components in the default list, I’m assuming this is an appropriate place to make a feature request.
It currently only works for the OP. I’d like to be able to add a TOC to a reply. Why?
When we do a webinar, we’ll announce it to the community with a post. After the webinar, we follow up with a reply in the same topic that contains the link to the recording and answers to all the questions that were asked during the webinar. We do this partly as a way to cover all the questions we couldn’t get to during the live session.
Those followup posts tend to get long and are typically sub-categorized by broad topic - perfect for a TOC (& actually the reason I installed the component).
Previously I’ve manually (and painfully) created a static TOC at the top of the reply post, but of course, once you’ve scrolled past it to the content, it’s no longer useful. Having the Disco TOC float alongside the content would be wonderful!
Interesting use case! I’ve done this in the past before too. Not sure if this will work in your case, but what we ended up doing is editing the first post to add the notes at the bottom, then replying to let everyone know about the edit. That way everything is neatly organized in the first post for posterity.
Yes, I totally get that. But it can be useful for the long term, and Discourse provides the edit history for those who want full transparency. Here’s an example of a topic that we rewrote after a webinar, back when I was working for Namati. We even changed the language to be past tense, so a summary of the webinar and no longer an announcement. And removed all the logistical details on how to join and so on, because no longer relevant.
For anyone who wants to apply DiscoTOC in their replies, I did this part of the work in my own fork!
Now it can apply TOC to any post and it works fine, just like it does on the OP.
It seems that the official team doesn’t think it’s necessary to apply DiscoTOC in the replies, so I won’t open a pull request. But you can use my modified version!
Lhcfl/DiscoTOC-edited throws the error «Uncaught TypeError: ((intermediate value) || this[e]) is not a function» on inserting a table of contents.
Discourse 3.2.0.beta4-dev.