All in the <head>

– Ponderings & code by Drew McLellan –

– Live from The Internets since 2003 –

About

Textile bookmarklet

13 May 2003

If you’re using Textpattern like me, or even the stand-alone Textile editor, you may find this bookmarklet useful. It copies the title of the page and url – in Textile URL format – to the clipboard.
Ready to paste right into a Textile window. Exceptionally useful when blogging. It’s IEwin only, I’m afraid.

Add this to your favorites: javascript:void(window.clipboardData.setData('Text',unescape('%22')+'('+document.title+')'+unescape('%22')+':'+document.location))

Any feedback or suggested modifications, let me know.

- Drew McLellan

Tags

Comments

  1. § Lonnie: Way cool idea. I am just a little bummed it doesn’t work in Mozilla.
  2. § Drew: I don’t believe there’s a nice x-browser method of copying data to the clipboard. Seems like a OS-specific tie in.

    What would be the next best option if the data wasn’t copied to the clipboard? How about a small popup window containing the text so that it could be copied manually?
  3. § Simon:

    I reallly liked your idea and I tried it in Firefox, without success. Actually, it could work, but you would need to enable copy to clipboard for all scripts in the browser, which is not secure…

    Playing around with it, I came up with this work around:

    javascript:void(prompt(”“,’(’+ document.title +’) ‘ + document.location));

    The title and URL are selected in the prompt area, all that’s needed then is to Ctrl+C it and close the dialog box.

    Not as neat as having it already in the clipboard in a single click, but I can live with that.

Photographs

Work With Me

edgeofmyseat.com logo

At edgeofmyseat.com we build custom content management systems, ecommerce solutions and develop web apps.

Follow me

Recent Links

Affiliation

  • Web Standards Project
  • Britpack
  • 24 ways

I made

Perch - a really little cms

About Drew McLellan

Photo of Drew McLellan

Drew McLellan (@drewm) has been hacking on the web since around 1996 following an unfortunate incident with a margarine tub. Since then he’s spread himself between both front- and back-end development projects, and now is Director and Senior Web Developer at edgeofmyseat.com in Maidenhead, UK (GEO: 51.5217, -0.7177). Prior to this, Drew was a Web Developer for Yahoo!, and before that primarily worked as a technical lead within design and branding agencies for clients such as Nissan, Goodyear Dunlop, Siemens/Bosch, Cadburys, ICI Dulux and Virgin.net. Somewhere along the way, Drew managed to get himself embroiled with Dreamweaver and was made an early Macromedia Evangelist for that product. This lead to book deals, public appearances, fame, glory, and his eventual downfall.

Picking himself up again, Drew is now a strong advocate for best practises, and stood as Group Lead for The Web Standards Project 2006-08. He has had articles published by A List Apart, Adobe, and O’Reilly Media’s XML.com, mostly due to mistaken identity. Drew is a proponent of the lower-case semantic web, and is currently expending energies in the direction of the microformats movement, with particular interests in making parsers an off-the-shelf commodity and developing simple UI conventions. He writes here at all in the head and, with a little help from his friends, at 24 ways.