Page 1 of 1

Is it possible to use URL hyperlinks in Key-Value pairs?

PostPosted: Thu Dec 06, 2018 4:39 pm
by Kouichi_C_Nakamura
Is it possible to use URL hyperlinks in Key-Value pairs (MapAnnotation)?

I could not, but the readme file of OMERO.mapr shows apparent hyperlinks (text in blue), so I wonder if it's possible or not. https://github.com/ome/omero-mapr

Re: Is it possible to use URL hyperlinks in Key-Value pairs?

PostPosted: Thu Dec 06, 2018 5:48 pm
by manics
Mapr overrides one of the webclient templates to make hyperlinks into links: https://github.com/ome/omero-mapr/blob/ ... al.js.html
It's not part of the standard OMERO.web. If you've got a test system you could try installing mapr even if you don't need most of the functionality?

Simon

Re: Is it possible to use URL hyperlinks in Key-Value pairs?

PostPosted: Mon Dec 10, 2018 11:49 am
by Kouichi_C_Nakamura
Thanks. We discussed the installation of OMERO.mapr before for other purposes, but this adds another advantage of using it.

I've noticed that, with standard OMERO.web, HTML tag like `<a href="https://www.ncbi.nlm.nih.gov/gene/14415">14415</a>` does not work. However, if I use an URL like "https://www.ncbi.nlm.nih.gov/gene/14415" as a value, it does look blue and allows us to jump to the destination page.

Image001.png
Image001.png (3.42 KiB) Viewed 1256 times

Re: Is it possible to use URL hyperlinks in Key-Value pairs?

PostPosted: Wed Dec 12, 2018 10:54 am
by mtbc
Dear Kouichi,

Thank you, an interesting observation. We'll have a think about this one: I can see that it would be useful to recognize simple cases more usefully but we may shy from having users expect arbitrary HTML to be supported!

Cheers,
Mark

Re: Is it possible to use URL hyperlinks in Key-Value pairs?

PostPosted: Thu Dec 13, 2018 12:05 pm
by Kouichi_C_Nakamura
I agree. What to be supported and what to be not.

Thinking of the appearance of MapAnootation on OMERO.web, just supporting the HTML <a> tag makes sense to me. You probably don't want <b> or <i> or anything more complicated than that.

Does that (supporting <a> alone) accidentally convert a literal text to a hyperlink? Quite unlikely, but not guaranteed.

Re: Is it possible to use URL hyperlinks in Key-Value pairs?

PostPosted: Thu Dec 13, 2018 12:50 pm
by manics
If it's just hyperlinks we could auto-link anything matching
Code: Select all
protocol://<non-space-characters>
and not bother with parsing html or any other markup?

Re: Is it possible to use URL hyperlinks in Key-Value pairs?

PostPosted: Thu Dec 13, 2018 1:35 pm
by Kouichi_C_Nakamura
Thanks.

protocol://<non-space-characters>


Looking at the screenshot I uploaded above (the Gene ID value), this I think is perhaps already working?

Maybe, it's good as it is, then? Just ask people to give up using <a> and instead ask to use full URLs?

Best,
Kouichi

Re: Is it possible to use URL hyperlinks in Key-Value pairs?

PostPosted: Thu Dec 13, 2018 3:32 pm
by manics
You're right! It looks like if you add a URL to a map-annotation in OMERO.web it only becomes hyperlinked after a refresh, this is why I thought it wasn't implemented, so I think using the full URL is the best option. We'll certainly consider adding limited formatting (e.g. limited HTML tags, or markdown) in future though.