[prev in list] [next in list] [prev in thread] [next in thread]
List: trac
Subject: [Trac] attached files used in wiki markup
From: cboos () bct-technology ! com (Christian Boos)
Date: 2005-03-29 3:40:38
Message-ID: 424913B6.9090607 () bct-technology ! com
[Download RAW message or body]
Christopher Lenz wrote:
> Am 29.03.2005 um 09:24 schrieb Christian Boos:
>
>> Quinn Comendant wrote:
>>
>>> Is it possible to display images uploaded as attachments to wiki
>>> pages in
>>>
>>> the markup of the wiki page themselves? The URL for accessing an
>>>
>> There's a ticket for that: #944 "Add support for simpler references
>> to attachments in Wiki pages and Ticket wiki", with a patch.
>>
>> The proposed syntax was:
>> * img:<the_attachment> to get the attached image displayed inline
>> * attachment:<the_attachment> to get a link to the attachment
>>
>> But I think that image:<the_attachment> should work as well.
>
>
> Hmm, how about a more generic syntax for inlining attachments? I
> mmight want to inline a patch, for example. Or anything else supported
> by the mimeviewers framework.
[[Inline(attachment:<type>:<id>:<file>)]] maybe with some optional
arguments, like:
* boxed=1 for having a border around the attachment
* float=left/right for placing the attachment in a floating div
* format=raw for by-passing syntax highlighting
>
> OTOH, inlining images has special requirements. You might want to
> restrict the width/height and provide an alternative text. This is not
> possible using TracLinks, but it would be possible using a wiki macro.
> The macro would accept the attachment:... link syntax, but also
> source:... links.
[[Img(attachment:<type>:<id>:<file>,width=200,height=200,title="My
picture")]] ...to be reminiscent of the IMG tag,
but the Image() macro should work the same.
>
> Actually, I think a macro is a better fit for this functionality.
> TracLinks are just *links* after all, not include/embed directives.
Ok, so let's have the following Wiki syntax
{{{attachment:<type>:<id>:<file>}}} for generating the link,
and the rest of the functionality implemented with Macros.
-- Christian
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic