Vincent Massol wrote:
On Dec 29, 2008, at 10:49 AM, Ludovic Dubost wrote:
Marius Dumitru Florea wrote:
ludovic (SVN) wrote:
Author: ludovic Date: 2008-12-29 10:10:55 +0100 (Mon, 29 Dec 2008) New Revision: 14946
Modified: platform/web/trunk/standard/src/main/webapp/templates/ editwysiwygnew.vm Log: XWIKI-3046 GWT Editor SyncPlugin: correct loading of initial content supporting images. Added a reset sync action
Modified: platform/web/trunk/standard/src/main/webapp/templates/ editwysiwygnew.vm =================================================================== --- platform/web/trunk/standard/src/main/webapp/templates/ editwysiwygnew.vm 2008-12-29 09:10:38 UTC (rev 14945) +++ platform/web/trunk/standard/src/main/webapp/templates/ editwysiwygnew.vm 2008-12-29 09:10:55 UTC (rev 14946) @@ -47,11 +47,16 @@ hookId: 'content', #if($request.sync=="1") syncPage: '$doc.fullName', + plugins: 'separator text valign list indent undo format symbol link image table sync',
+ inputURL: "${request.contextPath}/ com.xpn.xwiki.wysiwyg.Wysiwyg/empty.html",
Well I need a read empty content, and the issue is that when parseTemplate returns empty this is not considered as ok and will generate an error. So I have to use a real static HTML. What I need is not the exact relative path but the server part name so that images display properly.
This is currently working. This is good enough for now and specific to the sync method, since this is demo code. We can change it later.
Well this definitely needs comments since it's a hack and not an obvious one.
You could just put an xml comment instead of an empty string, to prevent the "template not found" error. -- Sergiu Dumitriu http://purl.org/net/sergiu/