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.

Thanks
-Vincent

> Ludovic
>
>> Why do you need this empty.html? Did you try setting the wysiwyg  
>> input
>> to an empty string?
>>
>> #set($ok = $wysiwygInput.put($wysiwygInputKey, "")) ?
>>
>> Plus, all the links and images will be relative to
>> ${request.contextPath}/com.xpn.xwiki.wysiwyg.Wysiwyg and this is  
>> not good.
>>
>>
>>> + #if($request.reset=="1")
>>> +      syncReset: 1,
>>> + #end
>>> #else
>>>       inputURL: "${tdoc.getExternalURL("view",  
>>> "xpage=wysiwyginput&key=$wysiwygInputKey")}",
>>> +      plugins: 'separator text valign list indent undo format  
>>> symbol link image table',
>>> #end
>>>       syntax: "$doc.syntaxId",
>>> -      plugins: 'separator text valign list indent undo format  
>>> symbol link image table',
>>>       toolbar: 'bold italic underline strikethrough | subscript  
>>> superscript | unorderedlist orderedlist | outdent indent | undo  
>>> redo | format | hr symbol | link unlink | image | inserttable  
>>> deletetable | insertrowbefore insertrowafter deleterow |  
>>> insertcolbefore insertcolafter deletecol',
>>>       space: '${doc.space}',
>>>       page: '${doc.name}',
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to