[pmwiki-users] How to strip wiki tags from action=source
Patrick R. Michaud
pmichaud at pobox.com
Fri Aug 18 12:36:48 CDT 2006
On Fri, Aug 18, 2006 at 05:21:38PM +0200, kirpi at kirpi.it wrote:
> This very thread stems from a still alive
> "Email response management system" thread, the results of which,
> though humble, seems encouraging to me [please visit
> http://www.kirpi.it/kirpimail/ajaxcars/index4 (it's a test page)].
> Is there a way to gather the "text" within a page, stripped from its
> wiki markup?
> The best we could do is to combine "action=source" with an empty skin
> containing just a <!--PageText-->.
> So that
> http://www.kirpi.it/wiki/pmwiki.php?n=Mail.HomePage becomes
> But yet the text you get is not ready to be used within an email.
> How is it possible to "clean" the body of the page from the wiki markup?
> Maybe is it possible to create a modified "action=source", or perhaps
> there are even easier options?
I've been thinking that pages maybe ought to have a "plaintext"
attribute, which is the text of the page after it has been converted to
HTML and stripped of wiki markup. Of course, the plaintext would
not contain the results of any (:include:), (:pagelist:), or other
It would be nice if the plaintext attribute was also a bit smart
about line spacing, so that paragraphs and headings would have
whitespace in the right places.
I may end up needing this so that we can easily do excerpts for
blogging and other purposes.
If it would be helpful, I could see about adding this feature
to the core fairly quickly.
More information about the pmwiki-users