Two more reasons:
* JavaScript is mostly used to create dynamic HTML pages with rich user
interaction. IMO pages shouldn't be dynamic when edited and they
shouldn't respond to user interaction as in view mode (e.g.
http://jira.xwiki.org/jira/browse/XWIKI-4665 ).
* Currently, there is a lot of JavaScript code included in view mode
which is rarely used inside the page content (at least for content
pages, e.g. those holding documentation). Since the WYSIWYG editor edits
only the page content I think it's good to not include all this
JavaScript code and thus reduce the loading time of the editor.
I'd like to make this change for 2.2RC1. Anyone against it?
Thanks,
Marius
Marius Dumitru Florea wrote:
Hi devs,
Right now JavaScript extensions are included when a document is rendered
in WYSIWYG edit mode. This has both advantages and disadvantages.
Pro: If the output of a macro depends on a JavaScript extension, then
the result of rendering that macro will be the same in view mode and
(WYSIWYG) edit mode.
Con: If the JavaScript extension is not aware of the edit mode then it
can modify the DOM document outside of the read-only macro markers which
leads to unwanted changes in the content of the edited document (i.e.
the modifications done by the JavaScript extension are saved). Such an
example is
http://jira.xwiki.org/jira/browse/XWIKI-4665 .
WDYT? Should we limit the WYSIWYG in order to make the editing safer?
I'm +0.
Thanks,
Marius
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs