问题
How do i display hyperlink in jsplumb
nodes. I want users to to create task flow chart with links in nodes. I want to create a flowchart editor for my website users. I am able to create the nodes but i cant set a title or hyperlink in the node
回答1:
Any DOM element can behave as a jsPlumb
node.
<div id="#myLinkDiv">
Start <br>
<a href="http://example.com">Link</a>
</div>
<div id='second'>
Second
</div>
jsPlumb.makeSource('myLinkDiv');
jsPlumb.makeTarget('second');
If you're worried about element drag interferring with anchor click, then you can use the filter parameter - http://jsplumbtoolkit.com/doc/connections.html#sourcefilter
jsPlumb.makeSource("foo", {
filter:":not(a)"
});
Above means, don't interfere with operations related to a (anchor tag)
.
来源:https://stackoverflow.com/questions/23903998/display-hyperlinks-in-jsplumb-nodes