Sign in or Register Home Logo DiamondRing.comYour Online Jewelry Shopping Network  
View Latest Products View Posts Ask Us Ask our Network Jewelers for a quote on a diamond/gemstone/jewelry

Diamond Search

Recent Entries

Blogging Tip: Add blockquotes to your bookmarlet





Cool Websites

Current Events






MT Tips & Tricks




Wedding Journal


May 2007

August 2005

May 2005

April 2005

February 2005

January 2005

October 2004

September 2004

August 2004

July 2004

June 2004

May 2004

April 2004

March 2004

February 2004

January 2004

December 2003

November 2003

October 2003

September 2003

August 2003

July 2003

June 2003

May 2003

April 2003

March 2003

February 2003

January 2003

December 2002

November 2002

October 2002


Connor Racing

Diamond News

Joho the Blog

Joi Ito

Mark Pilgrim





Movable Type

MT Tips & Tricks

October 20, 2002

Blogging Tip: Add blockquotes to your bookmarlet

I noticed the Movable Type community has a couple of great resources out there to help with this blogging software, so I thought I'd help out with a tip of my own.

There's this thing called a bookmarlet, it makes it very easy to post an entry into the blog from any page you are surfing from. So if you are on say Yahoo's most popular stories page and want to link to it, you simply select some text and click on the bookmark and it will automatically pop up a box with a link to the site you were just on. And to make it even nicer, the text you selected will be there too.

The thing is, when I'm quoting I always like to slip in blockquotes and this has to be added manually. So I came up with a way to have it inserted automatically.

Edit the bookmarklet. The original version should look something like this (I had to break it up a bit because the width was messing up the layout):

javascript:t=document.selection?document.selection.createRange() .text:document.getSelection();void( (' bm_show=trackback,category,allow_comments,allow_pings, convert_breaks,excerpt, text_more&__mode=view&_type=entry&link_title='+escape (document.title)+'&link_href='+escape(window.location.href) +'&text='+escape(t),'_blank','scrollbars=no,width=400,height=760, status=yes,resizable=yes,scrollbars=yes'))

depending on your settings of course. But what you want to look for is this "escape(t)" because that is the part that stores the text you have selected on the page. So you need to add blockquote before and after. But you need to watch out because there is some special javascript syntax to worry about. So directly before the single quote:


and directly after:


you want to add:


then directly after:


and before the comma:


you want to add:


so the end result will be:

javascript:t=document.selection?document.selection.createRange() .text:document.getSelection();void( (', category,allow_comments,allow_pings,convert_breaks,excerpt, text_more&__mode=view&_type=entry&link_title='+escape(document.title)+'&link_href='+escape (window.location.href)+'&text=<blockquote>'+escape(t)+'</blockquote>','_blank', 'scrollbars=no,width=400,height=760,status=yes,resizable=yes, scrollbars=yes'))

and your selected text will then always be surrounded by blockquotes.

The downside is that if you have selected no text on that bookmark, you will have an empty tag in the page. So you'll either have to manually remove or leave it in, which won't hurt much other than having a little extra html markup in your page.

  by GilbertZ | Leave or Read Comment(s) (2) | Links to this Entry (0)

May 2007
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

< Contact Us - Privacy Statement >

Copyright 1997 - Present,
All Rights Reserved.