[pmwiki-users] How to strip wiki tags from action=source

Pico pmwiki at ben-amotz.com
Sun Aug 20 13:50:59 CDT 2006


Patrick R. Michaud wrote:
> On Fri, Aug 18, 2006 at 09:01:42PM +0200, kirpi at kirpi.it wrote:
>>> I've been thinking that pages maybe ought to have a "plaintext" 
>>> attribute...
>> Do you mean something like
>> http://www.example.com/wiki/pmwiki.php?n=Mail.HomePage?attribute=plaintext
> 
> Well, I meant more along the lines that in addition to having
> a "text=" attribute in the page file that contains the markup text,
> it would also have a "plaintext=" value of the pagefile that
> contains the processed and de-markuped text.  This would then
> be available to page variables and other recipes that want to
> grab the plain text for a page without having to process the
> entire markup.
> 
>


There may be different notions of plaintext for different contexts.  For 
example, inline and block.  Inline might be used in a pagelist, where 
you might not want any justification (centering or flushright) or any 
block formatting (list, paragraph, break, div, table...), but where you 
might choose to retain bold and italics, for example.  Block plaintext 
might be used for includes and copy and paste scripts from PmWiki 
generated content to a mail or other app, where it could include block 
formatting such as lissts, breaks, paragraphs.

In light of the fact that there will be different contexts and needs for 
plaintext, I think:
(1) the markup should accept some parameters, and
(2) we need input and comment on what should be included in, and 
excluded from, markup rendering when a plaintext directive is invoked in 
different contexts.

PITS/00773 might be a good page to collect or summarize comments.


Pico




More information about the pmwiki-users mailing list