Monday, July 05, 2010

Anchor Links, And Post Editor Compose Mode

I like to include a link to the top of the displayed page, at the end of my posts.

I compose my posts in "Edit HTML" mode, and at the end of each post, I add

>> Top
<a href="#Top">&gt;&gt; Top</a>

That gives me a link to the top of the page, since I included an anchor link "Top" inside an HTML gadget, at the top of the page.

<a name="Top"></a>

That's simple enough, once you get used to adding the code.

There's a caveat here, though.

Having added the code
<a href="#Top">&gt;&gt; Top</a>
I have learned, the hard way that I cannot ever edit the post using Compose mode. Any time that I edit the post using Compose mode,
<a href="#Top">&gt;&gt; Top</a>
becomes
<a href="http://www.blogger.com/post-create.g?blogID=24069595#Top">&gt;&gt; Top</a>

Any time I create a post, I add
<a href="#Top">&gt;&gt; Top</a>
last. Then, stay in "Edit HTML" for any more editing.

Blogger Engineering has been shown this problem a few times. It's possible that it is deeply embedded in the Blogger code base, and will require much work to be diagnosed,

This may be a problem which we have to know about, and avoid causing. Compose anchor links, after using Compose mode.

>> Top

4 comments:

Chris S. said...

I've noticed that too, but I didn't realize it could be avoided by staying in HTML mode. Thanks for the tip!

Enchanted Gardens said...

This was driving me crazy! I found a more permanent solution - http://www.blogging.robertosblogs.net/2009/07/anchor-links-within-post.html

Glad to know I'm not alone!

RoryBore said...

oh may the shine upon you all the days of your life!!! I have been trying for hours to get my anchor tags to work -- they would work in preview, I'd switch to "Compose" then publish....the published page wouldn't work.
This is the first tutorial - and I've looked at dozens!! -- that provided that handy little tip.
THANK YOU!!

Melanie Friedrichs said...

Thanks! ugh that was annoying!