Thomas Mortagne wrote: > On Fri, Nov 21, 2008 at 4:10 PM, Vincent Massol <[EMAIL PROTECTED]> wrote: >> On Nov 21, 2008, at 12:30 PM, Vincent Massol wrote: >> >>> On Nov 21, 2008, at 12:06 PM, Vincent Massol wrote: >>> >>>> Hi, >>>> >>>> We have a decision to take to support image parameters when we're >>>> linking to an image. >>>> >>>> Here's what this would mean with the current syntax: >>>> >>>> [[[[image:attach.png||height="100" width="100"]]>>http://xwiki.org|| >>>> param=value]] >>>> >>>> Is that what we want? >> After discussing with Thomas we both agreed that we'd prefer to have >> this syntax above, i.e. >> >> [[[[image:attach.png||height="100" width="100"]]>>http://xwiki.org|| >> param=value]] >> >> And the good news is that I think I know how to modify wikimodel to >> support this. >> >> I'll thus try to implement this starting now. > > Ok then no need to answer the previous mail ;) > > I will just add something about why I think we need to support the > current syntax in place of finding one: > > This is a more generic problem that just image, how do deal with a > link in a link should be only a renderer choice and it should not > break the parser. > > If we say that link label is inline wiki syntax then link label is > inline wiki syntax with no particular case. It's really way easier and > understandable for user and in general more logical to have only the > label of the link in a link (because XHTML renderer decided to render > it that way) than a broken link. > > So to conclude if we want to change the image syntaxe it should not be > for this image in link problem.
I agree, +1. > >> Thanks >> -Vincent >> >>>> >>>> I'm not even sure we can implement this since wikimodel will consider >>>> the reference to be: >>>> [[[[image:attach.png||height="100" width="100"]] >>>> >>>> (since it'll use the first closing reference marker, i.e. "]]") >>>> >>>> So the question is: do we want to use a different syntax for images >>>> or >>>> should I try to make this one work? >>>> >>>> WDYT? >>> I can think of the following solutions: >>> >>> 1) Use a different syntax. For example: ((...)) >>> >>> [[((attach.png||height="100" width="100"))>>http://xwiki.org|| >>> param=value]] >>> >>> 2) Only allow inline images to be specified (i.e. [[label>>image:...]] >>> wouldn't be valid) and have a special handling for (% %) when placed >>> before an inline image so that the params are applied to the img tag >>> and not to a span tag. Note: not sure how hard this is to do. >>> >>> 3) Allow passing parameters for inline images use a special syntax. >>> For example: image:my.png||param=value. This would mean: >>> >>> [[attach.png||height="100" width="100">>http://xwiki.org|| >>> param=value]] >>> >>> ([[attach.png||height="100" width="100"]] would still be an image and >>> not a link) >>> >>> WDYT? Any other idea? >>> >>> Thanks >>> -Vincent >> _______________________________________________ >> devs mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/devs >> > > > _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

