"Using HTML in JointJS elements" jointjs tutorial demo broken

114 views
Skip to first unread message

L. Y. Pratt

unread,
Jun 1, 2021, 10:56:18 PM6/1/21
to JointJS
HI,
The code and demo at https://resources.jointjs.com/tutorial/html-elements is not working for me on either Edge or Firefox.  I wonder if modern browsers are blocking this functionality because of x-site scripting exploit possibilities?

I would like my users to be able to type a hyperlink into an element.  I don't need full html.

Any suggestions?

Thanks!
-L

Roman Bruckner

unread,
Jun 2, 2021, 2:45:39 AM6/2/21
to joi...@googlegroups.com
Hi,

That's an archived tutorial. It might have stopped working.

Here's a new version of elements with HTML face:

Alternatively, HTML can be added inside the <ForeignObject>. (Won't work in MsEdge)
https://github.com/clientIO/joint/blob/master/demo/shapes/src/foreign-object.js

You can use an SVG <a> element (https://developer.mozilla.org/en-US/docs/Web/SVG/Element/a) to create hyperlinks

You can also style the text to look like a hyperlink and open the link manually after the user clicks it.

Best,
Roman




--

---
You received this message because you are subscribed to the Google Groups "JointJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jointjs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jointjs/7a623fd6-2708-4e16-a52f-66111c23d212n%40googlegroups.com.


--
Reply all
Reply to author
Forward
0 new messages