[TxMt] <img> & <css> drag commands
Michael
michael at stoichiometry.net
Wed Mar 30 14:30:04 UTC 2005
On 30 Mar 2005, at 15:21, Allan Odgaard wrote:
> 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?
I only modified the image drag command, and when I tried to drag a css
file it still inserted the source of the file, but after trying the
drag command listed below for css it works fine - thanks.
Any suggestions for the image drag command?
>
>> 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