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?
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