Display hyperlinks in jsPlumb nodes?

孤街浪徒 提交于 2019-12-13 04:22:45

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!