[TxMt] Re: HTML autoconversion of urls to hyperlinks

Brett Terpstra brett at circlesixdesign.com
Thu Sep 6 01:06:56 UTC 2007


This is a modification of the command in the Hyperlink bundle as a  
new command.  It just adds code that checks to see if there is a  
title, and if not, checks to see if it's linking an image (HTML) and  
grabs, in order, it's alt or src attribute for the title.  It's  
rough, but it does need to be done.  The linking bundle frequently  
sticks entire html tags into the title attribute.  I'm a huge fan/ 
proponent of proper title attributes, so I'd like to make them as  
convenient as possible.

Also, I'm pretty sure that I made this version too HTML specific to  
be worth much to the Hyperlink Helper bundle.  But I only had about 5  
minutes to spend on it, so I'm offering what I can.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrapaslink.zip
Type: application/zip
Size: 1395 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20070905/b85d83c8/attachment.zip>
-------------- next part --------------


Brett

On Sep 5, 2007, at 8:10 AM, Brett Terpstra wrote:

> He's right.  If you just highlight a full image tag and choose Wrap  
> as Link, it will insert the full image tag into the title  
> attribute.  I have a regex to strip that, I'll upload tonight.
>
> Brett
>
> On Sep 4, 2007, at 7:27 PM, Allan Odgaard wrote:
>
>> On Sep 4, 2007, at 12:34 PM, James Hicks wrote:
>>
>>> When making image tags into links you get the entire image tag  
>>> duplicated
>>> into the title attribute. Would be nice if the tags were stripped  
>>> from this
>>> and just the filename minus extension was used.
>>
>> Can you give an example of this?
>>
>>
>>
>>
>> _____________________________________________________________________ 
>> _
>> For new threads USE THIS: textmate at lists.macromates.com
>> (threading gets destroyed and the universe will collapse if you  
>> don't)
>> http://lists.macromates.com/mailman/listinfo/textmate
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate



More information about the textmate mailing list