[xwiki-devs] [Rendering/Wysiwyg] Transformations and WYSIWYG
Hi, One issue to discuss/brainstorm. Transformations are meant to modify the XDOM into a new XDOM. This is for ex the mechanism used for handling macros (MacroTransformation). Now there are other use cases for Transformations. Examples: * auto-transforming words into wiki links when they're using camel case * automatically creating links on word that have an entry in wikipedia * transform special symbols such as smileys :) into images We don't want these changes to be persistent in the saved document. They are *temporary* modifications. However when the wysiwyg runs right now it'll offer the generated XHTML for editing (that generated XHTML contains the transformed XDOM) and thus when we save in the wysiwyg editor the transformations will also be saved, which is a problem. We've solved it by "cheating" a bit for macros by introducing HTML comments and special handling in the wysiwyg editor. Now I think we need to rethink this and make it more generic for any transformation. Any idea? I'll try to propose some ideas too... Thanks -Vincent
On Feb 19, 2009, at 9:42 AM, Vincent Massol wrote:
Hi,
One issue to discuss/brainstorm. Transformations are meant to modify the XDOM into a new XDOM. This is for ex the mechanism used for handling macros (MacroTransformation).
Now there are other use cases for Transformations. Examples: * auto-transforming words into wiki links when they're using camel case * automatically creating links on word that have an entry in wikipedia * transform special symbols such as smileys :) into images
We don't want these changes to be persistent in the saved document. They are *temporary* modifications.
However when the wysiwyg runs right now it'll offer the generated XHTML for editing (that generated XHTML contains the transformed XDOM) and thus when we save in the wysiwyg editor the transformations will also be saved, which is a problem.
We've solved it by "cheating" a bit for macros by introducing HTML comments and special handling in the wysiwyg editor. Now I think we need to rethink this and make it more generic for any transformation.
Any idea? I'll try to propose some ideas too...
I think a generalization of the comment strategy + make the transformations read-only in the editor + the ability in the editor to switch on/off transformation rendering + double clicking in transformation (when tx renderng is active) to edit original content. WDYT? Thanks -Vincent http://xwiki.com http://xwiki.org http://massol.net
Hi Vincent, Vincent Massol wrote:
On Feb 19, 2009, at 9:42 AM, Vincent Massol wrote:
Hi,
One issue to discuss/brainstorm. Transformations are meant to modify the XDOM into a new XDOM. This is for ex the mechanism used for handling macros (MacroTransformation).
Now there are other use cases for Transformations. Examples: * auto-transforming words into wiki links when they're using camel case * automatically creating links on word that have an entry in wikipedia * transform special symbols such as smileys :) into images
We don't want these changes to be persistent in the saved document. They are *temporary* modifications.
However when the wysiwyg runs right now it'll offer the generated XHTML for editing (that generated XHTML contains the transformed XDOM) and thus when we save in the wysiwyg editor the transformations will also be saved, which is a problem.
We've solved it by "cheating" a bit for macros by introducing HTML comments and special handling in the wysiwyg editor. Now I think we need to rethink this and make it more generic for any transformation.
Any idea? I'll try to propose some ideas too...
I think a generalization of the comment strategy + make the transformations read-only in the editor + the ability in the editor to switch on/off transformation rendering + double clicking in transformation (when tx renderng is active) to edit original content.
WDYT?
I'm not sure about turning off transformation rendering since we're talking about a WYSIWYG. As long as the user can edit the source behind the transformation then everything is fine IMO. I'm saying this also because turning off transformation rendering doesn't fit macros so we'd lose the generality, plus the implementation might be a bit tricky. WDYT about anonymous macros? They don't have parameters nor a name but only content. The WYSIWYG would handle them as regular macros: <!--startmacaro:|-||-|:)-->:)<!--stopmacro--> This way the WYSIWYG doesn't have to know about it. Only the rendering has to take care to save the result as :) and not {{}}:){{/}}. Thanks, Marius
Thanks -Vincent http://xwiki.com http://xwiki.org http://massol.net
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Marius Dumitru Florea wrote:
Hi Vincent,
Vincent Massol wrote:
On Feb 19, 2009, at 9:42 AM, Vincent Massol wrote:
Hi,
One issue to discuss/brainstorm. Transformations are meant to modify the XDOM into a new XDOM. This is for ex the mechanism used for handling macros (MacroTransformation).
Now there are other use cases for Transformations. Examples: * auto-transforming words into wiki links when they're using camel case * automatically creating links on word that have an entry in wikipedia * transform special symbols such as smileys :) into images
We don't want these changes to be persistent in the saved document. They are *temporary* modifications.
However when the wysiwyg runs right now it'll offer the generated XHTML for editing (that generated XHTML contains the transformed XDOM) and thus when we save in the wysiwyg editor the transformations will also be saved, which is a problem.
We've solved it by "cheating" a bit for macros by introducing HTML comments and special handling in the wysiwyg editor. Now I think we need to rethink this and make it more generic for any transformation.
Any idea? I'll try to propose some ideas too... I think a generalization of the comment strategy + make the transformations read-only in the editor + the ability in the editor to switch on/off transformation rendering + double clicking in transformation (when tx renderng is active) to edit original content.
WDYT?
I'm not sure about turning off transformation rendering since we're talking about a WYSIWYG. As long as the user can edit the source behind the transformation then everything is fine IMO. I'm saying this also because turning off transformation rendering doesn't fit macros so we'd lose the generality, plus the implementation might be a bit tricky.
Actually the implementation is not tricky if it's done on the server. The WYSIWYG just refreshes the content (just like macro refresh) with a special parameter to tell the rendering not to do those transformations. So toggling transformations rendering on/off should be easy to implement in the WYSIWYG.
WDYT about anonymous macros? They don't have parameters nor a name but only content. The WYSIWYG would handle them as regular macros:
<!--startmacaro:|-||-|:)-->:)<!--stopmacro-->
This way the WYSIWYG doesn't have to know about it. Only the rendering has to take care to save the result as :) and not {{}}:){{/}}.
Thanks, Marius
Thanks -Vincent http://xwiki.com http://xwiki.org http://massol.net
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (2)
-
Marius Dumitru Florea -
Vincent Massol