Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new feature request - html links and tooltips #28

Open
jupe opened this issue Apr 3, 2013 · 11 comments
Open

new feature request - html links and tooltips #28

jupe opened this issue Apr 3, 2013 · 11 comments

Comments

@jupe
Copy link

jupe commented Apr 3, 2013

It would be great if there can be links in entities, messages and also tooltips for them.

@bramp
Copy link
Owner

bramp commented Apr 3, 2013

So for example:

A->B: Visit www.google.com

?

I could do that quite easily I think.

@jupe
Copy link
Author

jupe commented Apr 4, 2013

Yes, that could be syntax for example. But more suitable might be that link are "hidden" to text.. Also A and B could be links as well..
e.g.
A: link for A [www.source-a.com]
B: link for B [www.source-b.com]
A->B: visit here[www.google.com]

@yusufnb
Copy link

yusufnb commented Apr 4, 2013

+1

One syntax could be:

A -> B: Some text [www.text-links-to.com] # Comment text in tool tip

Thanks for this awesome tool.

@smeijer
Copy link

smeijer commented Apr 16, 2013

If implementing this, it should be great if we can bind more than just a link. For example not opening a url, but executing some javascript (to show a lightbox or something like that).

@brandonstark
Copy link

+1
I would like to link from the svg to the corresponding message in my log file in the same page.

@winfinit
Copy link

winfinit commented Aug 6, 2014

Should it be then extended to actually custom attr's? (http://raphaeljs.com/reference.html#Element.attr)

so syntax for links would be:

a->b: some text [href="http://example.com"] 

that way we will cover colors and more, so i was thinking that we can extend that to all of the elements:
title, message, participant, actor, note

@ComFreek
Copy link

ComFreek commented Aug 6, 2014

I second @smeijer's opinion, it would be very nice to enter custom HTML or JavaScript.

@winfinit
Copy link

winfinit commented Aug 6, 2014

well, you could put javascript in href, in SVG it would translate to anchor tag essentially, where you can add javascript like so:

href="javascript:alert("hello")

html would be tricky, since output is SVG, it has its own markup (http://www.w3.org/TR/SVG/)

@ComFreek
Copy link

ComFreek commented Aug 6, 2014

@winfinit foreignObject makes this possible :) However, collisions between diagram parts and HTML couldn't be detected, I suppose.

@winfinit
Copy link

winfinit commented Aug 7, 2014

i have implementation that takes advantage or svg parameters, however implementation is hacky... (i didn't modify lexer), so i can work on a proper implementation if we can agree that we can try to match DOTs implementation of attributes:

Title: Foo Bar [href="http://example.com", fill="red"]
Participant A [href="http://example.com", fill="red"]
A->B: Login [href="http://example.com", fill="red"]
Note right of B: foo bar  [href="http://example.com", fill="red"]

@winfinit
Copy link

pull request was submitted for this issue: #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants