Hi,

Working on annotation feature, I need to retrieve
xwiki document source code from a selection on XHTML.

This requires to have a correspondence between content
typed by user and content that appears in html.

I noticed in xwiki 2.0 synthax that white spaces typed
in a list item context are ignored :

*<space><space><space><space><space>foo<space><space><space>bar<space><space><space>

renders in XHTML

<li>foo<space>&nbsp;&nbsp;bar&nbsp;&nbsp;&nbsp;</li>

so I could not determine the real offset of selection in xwiki
document source.

This can be solved by not ignoring spaces so render become :

<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foo<space>&nbsp;&nbsp;bar&nbsp;&nbsp;&nbsp;</li>

This policy of rendering already exists in underline or italic
context so it's strange to have a different behaviour in list
item context.

Moreover I think we should not suppose what content is
relevant for user or not, so source shouldn't be altered.


WDYT ?

Lucien



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

Reply via email to