ok I've started the implementation using Comments.

Thanks
-Vincent

On Oct 4, 2008, at 10:05 AM, Vincent Massol wrote:

> Two more things to take into account:
>
> a) This needs to work for macros too. Indeed we need to save the macro
> definition so that when we get back to the wiki editor we get the
> macro back (otherwise we would only get the result of the execution of
> the macro).
> b) The WYSIWYG editor code must be able to read the macro definition
> (be it in span or in comments) since the editor should do the  
> following:
> - display some outline around portions of text that are the result of
> the macro execution
> - allow users to double click inside the outline to edit the macro
> definition
>
> Thanks
> -Vincent
>
> On Oct 3, 2008, at 9:13 PM, Vincent Massol wrote:
>
>> Hi,
>>
>> Since recognizing links to be xwiki links is hard (not even always
>> possible) we need to add some extra information when we render wiki
>> syntax content into XHTML (for the WYSIWYG editor for ex) so that we
>> can convert it back to wiki syntax.
>>
>> We have 2 solutions I can think of:
>>
>> 1) Using a span with a class value:
>>
>> <span class="wikilinkplaceholder wikilink"><!
>> [CDATA[Space.ExistingPage]]><a href="/xwiki/bin/view/Space/
>> ExistingPage">Space.ExistingPage</a></span>
>>
>> 2) Using a comment:
>>
>> <!-- startwikilink:Space.Existing --><span class="wikilink"><a  
>> href="/
>> xwiki/bin/view/Space/ExistingPage">Space.ExistingPage</a></span><!--
>> stopwikilink -->
>>
>> Pros and cons:
>>
>> * 2) allows not generating visible content in XHTML so that if  
>> someone
>> copy/paste our generated XHTML he won't have to add some CSS rule to
>> prevent it from being visible. BTW I'm not even sure we can find a  
>> CSS
>> rule to do that in solution 1) so we might need to have 2 spans as  
>> in:
>> <span class="startwikilink"><![CDATA[Space.ExistingPage]]></ 
>> span><span
>> class="wikilinkplaceholder wikilink"><a href="/xwiki/bin/view/Space/
>> ExistingPage">Space.ExistingPage</a></span><span
>> class="stopwikilink"/>
>>
>> * 1) is harder to code since it requires using a SAX2 LexicalHandler,
>> which btw is not supported by all XML parsers:
>> "This is an optional extension handler for SAX2 to provide lexical
>> information about an XML document, such as comments and CDATA section
>> boundaries. XML readers are not required to recognize this handler,
>> and it is not part of core-only SAX2 distributions."
>> It also requires that I make some modifications to wikimodel since
>> wikimodel currently ignores comments.
>>
>>
>> Solution 2) seems slightly better to me but as it's quite more  
>> complex
>> to implement I'd like to be sure that it's the best solution.
>>
>> WDYT?
>>
>> Thanks
>> -Vincent
>>
>> _______________________________________________
>> devs mailing list
>> [email protected]
>> http://lists.xwiki.org/mailman/listinfo/devs
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs

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

Reply via email to