It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to link to a heading?

Looks like cloud editor doesn't support anchors?  so i have to try putting a url fragment with the heading title.

 

sometimes the link works, sometimes it just jumps to the page but does not scroll to the heading referenced in the URL fragment.

 

how is this supposed to work?

 

1 answer

0 votes

Hello Ray,

Thank you for bringing this to our attention. I believe you might be running into the following bug:

  • CONFCLOUD-62589 Following a link to an anchor within another page doesn't scroll at all after getting to the other page

When it does work, can you let me know if you are visiting from another page, or do you paste the URL into your address bar? Is there any difference that you notice compared to when the anchors do not work?

Regards,

Shannon

Hi Shannon

 

Testing this morning, it seems like it works if i create a link to another page, with a URL fragment, and simply click it to open in the same tab. if i hit the back button, i am returned to the place i came from.

 

For URL fragment links to the same page, if i click a url fragment to same page, it works, but back button does not scroll to original location

 

 

If i Ctrl-click the link to open in a background tab, it does not work.

 

If i right click and open in new tab or new window, it does not work.

 

If i copy the URL, open a blank tab, and paste URL into address bar, it does not work.

 

 

 

so in general, it kinda seems to work for the limited case of just clicking a link and replacing the content in the current tab, but all other browsing patterns are just busted.

 

 

 

(and please note that all of this URL fragment business is just a gross hack to work around the lack of simple anchor/href hyperlinking functionality....)

 

 

Latest Chrome on Ubuntu Linux 18.04

 

Thanks

Ray

Ray,

Thank you for letting us know how you were able to work around this. As far as I can see now, the original bug is resolved. Could you tell me if you are still experiencing this issue?

Regards,

Shannon

Still appears to be happening. 

Note, I'd rather not have to manually deal with URL fragments anyway Are there any plans to implement hypertext anchor/link functionality?   that's kind of the whole point of a wiki.... and they should definitely support tabbed browsing!

Hello Ray,

My apologies for the long delay. In speaking to the developer on that case, he let me know that this fix was resolved for the old editor. In the new editor, there is no anchor feature, and at this time, you can only link to headings and comments.

Per the Confluence Cloud Editor Roadmap:

The anchor macro is temporarily unavailable, but in the meantime, you can use these workarounds:

Add a table of contents macro to your page

This automatically generates anchor links for each page header. To find those links, right-click (or on mobile, long-press) any of the headers in the table of contents, and copy the link address.

Use page headers as anchors

Anchors are automatically generated for each page header. To link to one, use the https://pageURL#headingtext. The anchor text must be formatted as it is on the page, including punctuation marks, but without spaces.

For example, to link to this section, we would add #Anchors to the page URL, like so: https://confluence.atlassian.com/display/ConfCloud/Confluence+Cloud+Editor+Roadmap#Anchors

Can you confirm with me if the problem you are experiencing is with the new editor? You will be able to tell if the Publish button is in the top right-hand corner of the page while editing.

We are working on the solution for the anchors on the new editor in the meantime, and so you can follow this roadmap page for any updates.

Let me know if you have any questions about that.

Regards,

Shannon

Hi Shannon

 

Yah I'm using the new editor with the Publish at the top right, and the problem is present for both the TOC hack and the manual URL fragment hack.

 

A URL with a fragment only jumps to the target if you click it directly from a Confluence page into the same tab.  ctrl-click and shift-click for tabbed browsing, and pasting a URL into the address bar for direct access are busted.  they justshow the page and ignore the fragment.

 

Thanks

Ray

Just tried on firefox, not working there either.

Ray,

Thank you for confirming. So to confirm, the fix was only for the classic editor, as the anchor feature has not yet been fully implemented in the new editor.

This is the reason you are now seeing this behavior.

There's a similar bug here for the new editor:

  • CONFCLOUD-66822 Anchor Link does not redirect the user to the Anchor location in a Page when address link is copy-pasted in the address bar

And a feature request you might be interested in as well since I believe it's similar to your request from earlier:

Since the anchor feature is not yet released in the new editor, I would still encourage you to keep an eye on our Roadmap so you will know when the feature is available.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

How is your team having fun and bonding, remotely, utilizing Confluence?

Thanks everyone for answering last week’s question. The winner of the random drawing from those who commented is: @LarryBrock I’ll contact you separately with your prize details. This wee...

278 views 9 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you