[dokuwiki] Re: How to tell if a plugin generates 'block elements'?

On Wed, Feb 24, 2010 at 04:14:27PM -0300, Luis Machuca wrote:
> Chris G escribió:
> > Is there any obvious way of deciding whether a plugin
> > generates/contains 'block elements'?
> > 
> > Is the only way to look at the HTML generated and decide whether
> > anything there is a block element?  I assume that by 'block elements'
> > throughout the DokuWiki documentation is meant HTML block elements
> > although this doesn't seem to be a very well defined term.
> > 
> I hope I'm understanding this correctly.
> 
> 'Block elements' are defined by HTML to be things like <p>'s, <div>'s and the
> like (not <span>'s though). I know there is an actual "dictionary definition",
> I just can't happen to produce the link for it.
> 
> Assuming a plugin is well-developed and well-documented, checking that a
> plugin generates a "block elements" can be helped by checking the return value
> of its getPType() function.  See:
> http://www.dokuwiki.org/devel:syntax_plugins?s[]=ptype#ptype
> 
> If it returns "block", then the plugin content is enclosed in a block element
> -- most surely a <p>.
> 
> Of course another choice is to actually grep the code for block element tags.
> 
You understood perfectly and pointed me at exactly what I wanted to
know, the plugin 'type'.  I hadn't spotted this when I started
changing the code of a plugin I'm playing with.

Thanks!

-- 
Chris Green

-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts: