[TxMt] <img> & <css> drag commands

Allan Odgaard allan at macromates.com
Wed Mar 30 14:21:00 UTC 2005


On Mar 30, 2005, at 16:05, Michael wrote:

>> Could you try to change the drag command simply to:
>> echo $TM_DROPPED_FILE
> Thanks: that works - with just the path to the file being inserted.

Does it use the command then both for your image and CSS? or did you 
make the change for both drag commands?

> How do I modify it so that when I drag an image file to a document I 
> get:
> <img src="path_to_image" width="actual_pixels" height="actual_pixels" 
> alt=""  />
>
> and for css:
> <link href="path_to_css" rel="stylesheet" type="text/css" 
> media="my_choice"/>

Well... that's really what the default stuff should have done ;)

For CSS try then to change the drag command to:
printf '<link href="%s" rel="stylesheet" type="text/css" 
media="my_choice"/>\n' "$TM_DROPPED_FILE"

And let me know if that works.




More information about the textmate mailing list