[pmwiki] Re: [Pmwiki-users] Whitepaper about markup strategy

Patrick R. Michaud pmichaud at pobox.com
Fri May 16 17:18:46 CDT 2003


On Fri, May 16, 2003 at 11:26:14PM +0200, Bernhard.Weichel at t-online.de wrote:
> 
> As being involved in markup for a couple of years - non technical users
> want the "do what I mean" button. So they want a WYSIWYG stuff (a collegue
> of mine propose to integrate Typo3's rich text field when I showed him
> PmWiki).
> But, to be honest I am somewhat tired that any discussion ends in the
> statment
> that the markup reluctance of non-technical should prevent technical authors
> from getting more if they want more.

Oh, PmWiki doesn't prevent it, it just aims to protect the non-technical
folks from the technical ones.  A wiki administrator can always customize
to add more technical features.

> > Third, as I often tell others, I fairly strongly reject the claim that
> > "authors don't have to use the advanced markup if they don't want to".
> > I don't think that's true in a collaborative environment.  If
> 
> Collaboration means that the collaborators are somewhat on the same level.

I disagree.  Most of the environments I've worked in and used PmWiki for
have contributors at many different levels of expertise, and the 
lesser-expert authors would've been quickly and unintentionally excluded 
from participating.  See the "Experienced authors" section of 
http://www.pmichaud.com/PmWiki/Audiences.

> > Maybe I'm just missing the point.  But if we're willing to allow
> > things
> > like [.b_name]...[.e_name] in the markup, then why bother with a whole
> > new markup syntax?  Let's just use XML/HTML directly and say
> > <name>...</name>.
> 
> Patrick, this is fairly correct. I was driven by the fact that I did not
> manage to define customized markup in xml-style due to the fact that HTML
> markup characters
> are preserved in the very first step of PmWiki page processing.
> Otherwise I would never have proposed any other markup style.

Oh.  If you really want the XML tags, just use $DoubleBrackets to preserve
them and convert them back into html markup!  Something like (in local.php):

	$XMLTags = "a|img|li|p|table|tr|td|ol|ul|dl|pre|br";
	$DoubleBrackets["/\\&lt;(\\/?($XMLTags)\\b.*?)\\&gt;/"] = 'xml("$0");';
       
	function xml($str) {
	  $global $xmlcount,$xmlv;
	  $xmlcount++; 
          $xmlv[$xmlcount] = '<'.str_replace('&amp;','&',$str).'>';
          return "\265$xmlcount\265";
        }

        $InlineReplacements['/\265(\\d+)\265/e'] = '$GLOBALS["xmlv"][$1]';

This gives you back the XML (or HTML) tags defined in $XMLTags.

Alternatively, if this feature is really important to a few folks I'll add 
it directly to the PrintText function (before doing the html_specialchars), 
with the default allowed tags set to null to preserve PmWiki's 
HTML-in-wiki-is-bad philosophy.

> And I would not have tried to workout a strategy if it wouldn't take so much
> time to collect all the tips and tricks from various pages in the
> documentation,
> ...
> Not that I claim about the quality of documentation - it is much more than
> elsewhere, and I have the chance to contribute for improvement.

Thanks.  And yes the documentation needs work but that just takes time.
Until mid-February most of the documentation you see now didn't exist.  :-)

Pm




More information about the pmwiki-users mailing list