[pmwiki-users] Re: shortcut >>div<< and tables
mistyfire at autograf.pl
Tue Jul 26 06:06:10 CDT 2005
On Tuesday 26 July 2005 02:50, you wrote:
> On Tue, Jul 26, 2005 at 02:48:52AM +0530, V.Krishn wrote:
> > > > I think width and height is an essential ingredient for a block
> > > > element.
> > >
> > > Probably so. Part of the problem is that they're already being used
> > > for images in the <img> tag, so trying to differentiate between
> > > applying width to an image versus width on some other construct is a
> > > bit tricky. Any suggestions you might have would be welcomed.
> > >
> > > Pm
> > Thanks, but could this be made a little more illucid with some example?
> > ....mmm.. perhaps some wiki text that I could post on my wiki to see it
> > in pratical.
> Okay, I'll try and explain it in more detail (maybe it will help me
> figure out a solution, too :-). If I write markup as
> %bgcolor=white% Here is some text.
> the resulting output is
> <span style='bgcolor:white;'> Here is some text.</span>
> Most of the wikistyle elements are this way -- they are applied to
> a span surrounding the text that follows. But "width" is different,
> because it expects to be applied to an <img .../> tag, so that
> %width=100px% See my photo at http://www.pmwiki.org/toast/ptart-1c.gif
> results in
> See my photo at
> <img src='http://www.pmwiki.org/toast/ptart-1c.gif' width='100' />
> Note that it is not
> <span style='width:100px'> See my photo at ... </span>
> which would do something entirely different, and that the width
> wikistyle directly becomes an attribute of the <img .../> tag,
> rather than something in a style= attribute.
> So, in order for width= and height= wikistyles to work in divs and
> other constructs, the wikistyles code has to be smart enough to
> know where it's being applied and what to generate; i.e., to be
> applied to only an <img .../> tag as a width= or height= attribute,
> or to be applied to a block-level tag as a width or height property
> in a style= attribute.
> I'm not saying it can't be done; I just hadn't figured out good code
> to make it happen. But now that I've crystallized the issue I think
> I might be able to make it work... :)
:-), great this would help a lot.
Just to point out:
In the earlier examples the width syntax are enclosed by %width=100px% .....
and the intented required feature is >>width=100px<<, could this be a catcher
to distinguish during processing?
> Oh, before I forget -- one can also write the above line as
> (:div class=test1 width=200px bgcolor=beige:)
> and it works just fine.
hmmm.. yes :-) though not much different, but typing >><< some how seems more
fun and easier.
More information about the pmwiki-users