Using image in document viewer

I’m wondering if it’s possible to use images in the document viewer.

We’re trying to add some documentation to certain UDTs, and this could be done by putting some HTML in tags, but we’re looking for a simple way to add images in some of those documentation strings.

It would be ideal if we could use the images in the image manager in some way, but I can’t find the path. The document viewer also doesn’t like base-64 encoded images apparently, so I’m a bit stuck.

Can you use the web browser component to display the HTML?

Yes, but the web browser is a bit heavy for this (it’s a complete webkit engine).

While that documentation is something that should load quickly, and it’s very simple 90’s style HTML.

And the price also matters a bit. I know it’s a rather cheap module to acquire, but for such a small feature like in-app documentation, we also can’t charge a lot to our clients.

After a bit of looking around, it should be possible with the jar: protocol to load images from Jar files into a Java swing object. But I have no idea what path I should look for,

Currently I’m trying some code like this below to get such a jar: url on a button click, but it keeps returning a None object, and no url I can use

event.source.getClass().getResource("Builtin/Heating/Heating 5.png")

.getResource() looks in the virtual folder of that class’s jar file, alongside the class file. You’ll need to use .getClass() on one of your object’s in your jar file that has the images you need.