Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I already know how to add links via Bookmarks and Table of Contents. I also know how to directly link to a header

However, rather than pasting the entire url for the header, which creates an absolute link to that specific Google Doc, I want to just paste the fragment (#header=h.abc123xyz). This has the benefit of being document relative, in the sense that if someone makes a copy of my document, saves it as an HTML page, etc (thus changing the URL), the anchor will still work as expected in the new document. Currently, it would just link to the section of the original document.

Is this possible?

Note: I've tried just pasting the fragment in the regular Insert Link dialog, but Google thinks it's an invalid url. Is there a workaround? Am I doing it wrong?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

If I click Insert / Link... and put in #header=h.abc123xyz, when I save it as an HTML document it is converted to #h.abc123xyz and it works as expected.

share|improve this answer
    
Yes, since I asked the question they apparently allowed this behavior. In fact, when you now choose "Insert Link" (CTRL+K) it gives you a dropdown to select section headers, which then inserts the #heading... thing. –  drzaus Sep 23 '13 at 14:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.