SID-02044: Can I add an anchor to every headline?
| Status: |
Answered |
TWiki version: |
5.0.0 |
Perl version: |
|
| Category: |
CategoryPlugins |
Server OS: |
|
Last update: |
10 years ago |
I have question regarding a feature for which I though there should be a plugin, but I could not find it. Any pointers are highly appreciated.
I want to add the anchor link for head heading of a wiki page to the heading itself. This would allow me to copy the URL to an anchor while looking at the heading (right click, or just click on it and copy from the URL bar).
Even better would be an integration that I like on
GitHub and Markdown documents: when you hover over a heading an anchor symbol appears next to the headline, and the anchor image actually has a href to the heading so I can click on it an copy the direct link from the browser.
Does something like that exist for Twiki?
If not, do you think it can be easily emulated with a template adjustment?
--
Daniel Nüst - 2015-03-26
Discussion and Answer
Sounds like a good idea. AFAIK there is no plugin with this functionality.
FYI, TWiki already adds an anchor to every heading. For example, the h2 "Discussion and Answer" heading has anchor "#Discussion_and_Answer".
Are you a developer? You could write a plugin that adds a copy URL popup on hover over a heading. I'd use the
postRenderingHandler to add a hidden div with absolute positioning, that is made visible on hover. See
GettingInvolved for intro,
TWikiPlugins for docs, and skeleton code
SVN:EmptyPlugin/lib/TWiki/Plugins/EmptyPlugin.pm
.
--
Peter Thoeny - 2015-03-26
Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the
TWiki consultants if you need timely help. We invite you to
get involved with the community, it is more likely you get community support if you support the open source project!
--
Peter Thoeny - 2015-12-03
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.