W3C home > Mailing lists > Public > www-archive@w3.org > October 2005

How to create a quote with a bookmarklet

From: Karl Dubost <karl@w3.org>
Date: Mon, 31 Oct 2005 09:32:48 -0500
Message-Id: <4877F1A6-3B53-4B92-896C-D0E3BE3D7DCD@w3.org>
Cc: www-archive@w3.org
To: Dan Connolly <connolly@w3.org>

Hi DanC,

I have found your page about [quoting with bookmarklet][1]  
interesting, but it didn't work for me.

Issues:

1. Validation
The blockquote must have a
     <blockquote><p>
     
     </p></blockquote>
to validate

2. Address
Address element is used to give the author of the page not the title.  
"cite" element is more appropriate

3. Issue with Camino Browser on mac.
To work around a problem with camino, I have created a textarea so I  
could cut and paste the text in my source code.


My code proposal:

Suggestions and modifications are welcome.

javascript:void(window.open('%20').document.write('%3Ctextarea% 
20rows=20%20cols=80%3E%3Cblockquote%20cite=&apos;'+location.href 
+'&apos;%3E\n\n%3Cp%3E'+document.getSelection()+'%3C/p%3E\n\n%3C/ 
blockquote%3E\n\n%3Cp%3E%3Ccite%3E%3Ca%20href=&apos;'+location.href 
+'&apos;%3E'+document.title+'%3C/a%3E%3Cbr%20/%3E'+new%20Date 
(document.lastModified).toUTCString()+'%3C/cite%3E%3C/p%3E%3C/textarea 
%3E'))


[1]: http://www.w3.org/2000/08/eb58

-- 
Karl Dubost - http://www.w3.org/People/karl/
W3C Conformance Manager
*** Be Strict To Be Cool ***
Received on Monday, 31 October 2005 14:32:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 7 November 2012 14:17:53 GMT