[pmwiki-users] Getting Access to Wiki Markup

Petko Yotov 5ko at 5ko.fr
Thu Feb 6 16:09:10 CST 2014

Crisses writes:
> I want something similar  
> to <URL:http://www.pmwiki.org/wiki/PmWiki/UpdatePage>http://www.pmwiki.org/wi 
> ki/PmWiki/UpdatePage
> but to document instead how PmWiki gets from reading a page  
> (RetrieveAuthPage()) to what is placed in the browsers' (e_)textarea for  
> editing a page ($EditText).
> In other words I want the "EditPage" portion of the EditPage->UpdatePage  
> transaction.
> I'm working on XMLRPC, I've gotten the hang of what I'm doing, but I need to  
> produce in the XML exactly the type of page content - markup & all - that we  
> would edit natively in a browser window.
> Is this documented?  Is there a specific function to add back in newlines and  
> etc. before "sending it to the browser"?

  $page = RetrieveAuthPage(...); // check docs or php source
  $text = $page['text']; // plain text
  $EditText = PHSC($text, ENT_NOQUOTES); // htmlspecialchars inside e_textarea

Alternatively you might just need YourPage?action=source.


More information about the pmwiki-users mailing list