Where does the raw wiki markup on a pier page come from?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Where does the raw wiki markup on a pier page come from?

Matthias Berth-2
Hi,


I know that a PRDocument is a tree of objects that correspond to the
structure of a HTML document, such as paragraphs (PRParagraph), list
items (PRListItem) etc. When I edit an existing wiki page, where does
the raw wiki text come from? Is it re-generated from the objects
inside the PRDocument (how?), or is it kept somewhere in a separate
place?

Thanks

Matthias
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Where does the raw wiki markup on a pier page come from?

keith1y

On 9 Feb 2010, at 00:52, Matthias Berth wrote:

> Hi,
>
>
> I know that a PRDocument is a tree of objects that correspond to the
> structure of a HTML document, such as paragraphs (PRParagraph), list
> items (PRListItem) etc. When I edit an existing wiki page, where does
> the raw wiki text come from? Is it re-generated from the objects
> inside the PRDocument (how?),

yes, it is regenerated by the PRWikiWriter visitor which traverses the  
object tree.

Keith


_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Where does the raw wiki markup on a pier page come from?

Lukas Renggli
In reply to this post by Matthias Berth-2
> I know that a PRDocument is a tree of objects that correspond to the
> structure of a HTML document, such as paragraphs (PRParagraph), list
> items (PRListItem) etc. When I edit an existing wiki page, where does
> the raw wiki text come from? Is it re-generated from the objects
> inside the PRDocument (how?), or is it kept somewhere in a separate
> place?

  PRDocumentParser parse: aString
     gives you a document tree from a wiki string.

and the opposite

  PRWikiWriter write: aDocument
     gives you the wiki string.

  PRTextWriter write: aDocument
     gives you a plain text string.

  PRViewRenderer new start: aDocument in: aComponent on: html
     renders a document as HTML

  ...

and there are some other output formats, such as LaTeX, RSS, ...

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Where does the raw wiki markup on a pier page come from?

Matthias Berth-2
Ah, thanks a lot, Lukas and Keith.

Matthias

On Tue, Feb 9, 2010 at 8:59 AM, Lukas Renggli <[hidden email]> wrote:

>> I know that a PRDocument is a tree of objects that correspond to the
>> structure of a HTML document, such as paragraphs (PRParagraph), list
>> items (PRListItem) etc. When I edit an existing wiki page, where does
>> the raw wiki text come from? Is it re-generated from the objects
>> inside the PRDocument (how?), or is it kept somewhere in a separate
>> place?
>
>  PRDocumentParser parse: aString
>     gives you a document tree from a wiki string.
>
> and the opposite
>
>  PRWikiWriter write: aDocument
>     gives you the wiki string.
>
>  PRTextWriter write: aDocument
>     gives you a plain text string.
>
>  PRViewRenderer new start: aDocument in: aComponent on: html
>     renders a document as HTML
>
>  ...
>
> and there are some other output formats, such as LaTeX, RSS, ...
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki