Well, I figured out the copy to clipboard icon, but now I am trying to
figure out how to program a copyHyperlinktoClipboard where it will copy a
pretty hyperlink into the clipboard. I am using IE7. What I have so far
doesn't seem to work. So far I have:
[[copyHyperlinktoClipboard]]
/%
!show
<html><nowiki><a href="javascript:;" title="$2"
onclick="
var newtext='$1';
var element = newtext.split("|");
var linkElement = document.createElement("a");
linkElement.setAttribute("href", element[1]);
linkElement.innerHTML = element[0];
var linkSubElement = document.createElement("div");
with (linkSubElement) {
contentEditable = true;
}
linkSubElement.appendChild(linkElement);
var r = document.body.createTextRange();
r.moveToElementText(linkSubElement);
alert(linkSubElement);
r.select();
r.execCommand("Copy");
return false;
"/>$1</a></html>
!end
%/<<tiddler {{var src='copytoClipboard2';
src+(tiddler&&tiddler.title==src?'##info':'##show')}}
with: {{'$1'!='$'+'1'?'$1':'copytoClipboard2'}}
{{'$2'!='$'+'2'?'$2':'clicking this link will copy this hyperlink into the
clipboard'}}
>>If anyone can help with this I would appreciate any help. As you can see, I am not very good at programming. I was hoping that by using <<tiddler copyHyperlinktoClipboard with: "Pretty link|http://prettylink.com">> could copy pretty links to the clipboard so that when pasted it is a hyperlink that says Pretty link but when clicked takes you to http://prettylink.com. -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.

