On Wed, Jan 23, 2019 at 3:08 PM Adel Atallah <adel.atal...@xwiki.com> wrote:

> On Wed, Jan 23, 2019 at 11:31 AM Marius Dumitru Florea
> <mariusdumitru.flo...@xwiki.com> wrote:
> > It's not that simple.. If the reference parameter already has a value
> that
> > is not a document reference then by showing the document picker that
> value
> > will be parsed / resolved as a document reference and thus displayed as
> if
> > a document has been selected. This can confuse the users. For instance,
> if
> > someone writes in wiki syntax:
> >
> > {{include reference="path.to.p...@file.txt" type="ATTACHMENT"/}}
> >
> > and then edit the page with the WYSIWYG editor, he will see "txt" as
> > selected value when editing the macro...
>
>
> I just tried with `{{display reference="sandbox.webh...@xwikilogo.png"
> type="ATTACHMENT"/}}` and the element was displayed as is in the
> WYSIWYG editor.
> I think this is because the picker uses the search REST API
> (/wikis/{wikiName}/search) which doesn't seems to use a reference
> resolver.
> So one issue is that you won't have autocompletion if you use a prefix
> on a document reference.
>
>

> Also one think I don't currently like is that you cannot edit the
> selected item in the picker, which means, for instance, that if you
> made a typo in "sandbo.webh...@xwikilogo.png" then you'll have to
> delete this element and rewrite the whole reference.
>

I think you can copy the text, delete the option and paste the copied text.
It's not a big issue for me.


>
> I'll make a PR and show you some screenshots or videos so you can see
> what we could currently have.
>

Reply via email to