Sunday, February 14, 2010

Tip: Editing old post and using the HTML comment tags to hide the original

A blogger asked: "if a do a post/message in blogger. And after I rewrite this post. But more later I want to replace (substirute) the rewrited post by the first original post. How can I do it?"

I assume the above implies frequent editing of old post and the possibility of reverting to the earlier/previous edition after editing. Now the problem is the previous edition would most probably have been overwritten by Blogger.com's automatic saving, so how to revert to the earlier/older edition?

Here is what I would suggest. Suppose I now want to edit an old post. What I would do will be to first copy-paste the whole original post within the same post under editing with one following the other so that there will be 2 duplicate copies of the post with duplicate below the original.

Now I would surround duplicate with a pair of the comment tag <!-- and --> like this (anything that is surrounded by the pair of comment tags will not be displayed by any browser):

Enviroman says: "We must take very good care of our 1 and only Spaceship Earth without lifeboat. Where can we go if something terrible happen to our spaceship and it become unlivable? What will we leave behind for our children, grandchildren, great grandchildren? What kind of legacy are we leaving behind?
<--
Enviroman says: "We must take very good care of our 1 and only Spaceship Earth without lifeboat. Where can we go if something terrible happen to our spaceship and it become unlivable? What will we leave behind for our children, grandchildren, great grandchildren? What kind of legacy are we leaving behind?
-->

Perhaps for extra measures, we may append an Version note and date, like for example, Version 1.0 14 February 2010, so it become

Enviroman says: "We must take very good care of our 1 and only Spaceship Earth without lifeboat. Where can we go if something terrible happen to our spaceship and it become unlivable? What will we leave behind for our children, grandchildren, great grandchildren? What kind of legacy are we leaving behind?
<--
Version 1.0 14 February 2010:
Enviroman says: "We must take very good care of our 1 and only Spaceship Earth without lifeboat. Where can we go if something terrible happen to our spaceship and it become unlivable? What will we leave behind for our children, grandchildren, great grandchildren? What kind of legacy are we leaving behind?
-->

And now we can confidently edit the first duplicate and if we don't like what we did, all we have to do is to discard it and remove the pair of comment tags to make the original display.

If you don't like the above method, perhaps you can copy-paste the original post to be edited into a new post, then save the original as draft. If you don't like the new edited post, then discard it, go back to the draft and republish it.

3 comments:

  1. I would expect your method to work, but there's a problem - whenever I exit HTML mode and re-enter it, all the HTML comments are deleted! Do you know how to stop this from happening?

    ReplyDelete
  2. For some reason, blogger deletes code that is in comment tags

    ReplyDelete

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics