Custom HTML nodes

Hello guys,

Current setup:
The GoJs is included in a design library and this library is consumed by the Angular application. The library accepts the list of nodes and links as input from the consumer application.

We are currently migrating from mx-graph to GoJS.
And we had support for a custom node where the node template can be passed as an HTML string from the consumer application as an input.
Wondering if we have such kind of support in the GoJs?
(Something similar to the geometryString in the shape, but with HTML string)

We are aware that we can create a customized node using the GoJs inbuilt methods.
But, we want our consumer component not to have any dependency on the GoJs ( The design library will have a dependency on GoJs, but that’s okay).

Any pointers on how to achieve this?

Sorry, but there is no way to put arbitrary HTML in a Node or a Link.

What subset of HTML is your consumer component generating? Do you have some non-trivial examples that you can share with us?

Hey Walter,

This is just one of the example the consumer component is sending
<div class="metric"><span class="label">${metric.label}</span><span class="value">${metric.value}</span></div>
The stylings and placeholder expression values in the above HTML will be applied from the consumer component.

Sorry, but that is way too general HTML for us to try to re-implement.

Why doesn’t the component just send you the values of metric.label and metric.value and then you can render it?