On Tue, Nov 24, 2009 at 12:21, lucaa <[email protected]> wrote:
>
> Hi devs,
>
> my need of the plain text renderer is to produce a formatting/tags free
> version of an XWiki document, something like "what the user sees in the html
> version but without the tags".
>
> So one idea would be that the plain text renderer handles the *raw blocks
> depending on their syntax*: we first should make it render the 'plain text'
> raw blocks, because it's supposed to know plain text and then we could think
> about adding a HTML syntax handler which would strip out tags and only print
> the text in the HTML (useful for my usecase above). Also other syntaxes
> could be added if we think that it makes sense.
>
> However, there isn't really a very good reason for which a PlaintextRenderer
> would know about HTML. It really depends on how we define the purpose of the
> plain text renderer.

I tough of it a little and i think we could have something like a
ContentCleaner (or ContentFilter, SyntaxFilter, RawFilter; RawCleaner,
...) component interface used by the plain text renderer to filter raw
block content. Then XHTML module provide an implementation of
ContentCleaner for xhtml. That would avoid having plain text renderer
strongly depends on any specific syntax and still able to support any
syntax which provide the right cleaner/filter.

>
> WDYT?
>
> Happy hacking,
> Anca
>
>
>
> tmortagne wrote:
>>
>> Hi devs,
>>
>> We need to decide what to do with html macro content (or any other
>> RawBlock content) in plain text renderer.
>>
>> For me the rule of plain text renderer should be to print anything we
>> are able to print which mean printing any pure text content and skip
>> styles for which obviously we don't have syntax. RawBlock content is
>> pure text so we should print it.
>>
>> Note that first version of plain text renderer was printing html
>> content and it was lost when introducing RawBlock.
>>
>> Here is my +1 for printing RawBlock content in plain text renderer.
>>
>> WDYT ?
>>
>> --
>> Thomas Mortagne
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>>
>>
>
> --
> View this message in context: 
> http://n2.nabble.com/VOTE-What-to-do-with-RawBlock-in-plain-text-renderer-tp3328576p4057164.html
> Sent from the XWiki- Dev mailing list archive at Nabble.com.
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to