Hi Julien,

On 05/11/2010 12:17 PM, jurevert wrote:
>
> Hi,
>
> Our goal is to develop a wysisyg macro allowing to :
> - Insert an Image stored on Alfresco
> - Insert a link to a document stored on Alfresco
>
> To do this; we have develop a small browser on Alfresco in order to choose
> the image to insert (img src) or the file to link (a href).
>
> After selecting the Alfresco file; we need to generate a macro like :
> [[Lien vers le doc
> toto>>http://alfresco.airfrance.fr/alfresco/.../toto.doc||rel="__blank"
> title="Ouvrir le doc toto..."]]
> or
> [[image:http://alfresco.airfrance.fr/alfresco/..../image.jpg]]
>
> Using the wiki editor and the old Wysiwyg editor; we had no problem to do
> this. (Openning popup and populate les link field with alfresco file path.)
>
> With the new editor; I can't find the way to do this.
> In fact my problem could be resume to add a picto in the 'link' and 'image'
> macro GUI allowing to open my alfresco browser in order to populate the path
> !
>
> Any idea to do this ?

Let me see if I understood correctly what you want to achieve:

(1) On the "Select the image to insert" wizard step there should be 
three tabs: Current page, All pages and _Alfresco image_. On the 
_Alfresco image_ tab the user should be able to select an image from 
Alfresco using the browser you developed.

(2) The link menu should contain a new _Alfresco document_ entry which 
should open a dialog containing the browser you developed. This way the 
user can choose a document from Alfresco to link to.

In this case, you'll have to extend the image ( 
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/image/
 
) and link ( 
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/link/
 
) WYSIWYG editor plugins, which is not straightforward. Are you familiar 
with GWT?

Extending the link plugin is a bit easier because it already supports 
external links. You just have to add a new menu entry ( 
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/link/LinkMenuExtension.java
 
) and create a new WizardStep to display your Alfresco document browser. 
I can help you with this.

Extending the image plugin is more difficult because we don't support 
yet inserting external images from the WYSIWYG editor. The image plugin 
was designed to work with XWiki attachment references. Some parts need 
to be rewritten to support external images use case. You can open a JIRA 
issue for this and I'll try to handle it asap. Then you'll be able to 
extend the 
http://svn.xwiki.org/svnroot/xwiki/platform/web/trunk/xwiki-gwt-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/image/ui/ImageSelectorWizardStep.java
 
to aggregate a step that displays your Alfresco images browser.

Hope this helps,
Marius

>
> Thanks,
> Julien
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to