On 11/12/09 3:54 PM, Marius Dumitru Florea wrote:
[snip]
BTW is it such a good idea to load extensions in edit mode?
I'm not very convinced, since some extensions could affect the content
of the edited DOM, leading to weird content. (Think about the addSizes
extension of the SX tutorial for example
http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial).
There were some complains regarding the fact that the live table doesn't
look the same in edit mode so I had to load the extensions in edit mode
(
http://jira.xwiki.org/jira/browse/XWIKI-3991 ). This is just an
example. Once we have transformation markers any JSX will be able to
change the DOM provided the changes are marked. Also, I'm thinking that
a macro could use a JSX to "draw" something on the page. If JSX are not
loaded in edit mode the page will look different.
Marius
http://markmail.org/thread/rubnuunk4vd25bzt see :)
I don't remember we've voted on that, we probably should have. I'm
really not fan of executing the scripts in the WYSIWYG, in the end.
Even the "mark DOM changes" technique will not be enough, as we can't
control how JS libraries we use do inject their content (typically the
lightbox code here) and most extensions are made of/rely on external
libraries.
For the livetables (
http://jira.xwiki.org/jira/browse/XWIKI-3991 ) I
tend to think it would have been enough to have the proper CSS, but not
the JS (and have the table would remain empty). I don't see the value of
having the tables really work in edit mode. (Except for saying "it's
really WYSIWYG").
I don't like too much the strategy that would say "extensions developers
have to check if they are executed in the WYSIWYG (I guess it's
possible, not tried yet) and adapt the extension behavior accordingly"
Feels somehow a bit too complex.
Jerome.