Skip to main content
16-Pearl
January 21, 2021
Solved

Create a mashup with own HTML code

  • January 21, 2021
  • 2 replies
  • 4570 views

I need to open a page with HTML code generated by a service, I can use:

  • a standard mashup with the  Html TextArea widget inside (passing to it the html generated by a service)
    this works if edit mode is enabled, but if I set "read only" to hide the editing bar, the HTML is not rendered correctly (there is a basic table <table> <tr> <td>..... it just shows text, not the table grid. May be a bug)
  • Generate the .html file on a repository, and open with browser.
    I didn't tested but it should work ..

are there other options ?

 

// I have thingworx 8.5.9

Best answer by iguerra

I found that the ValueDisply widget, specifying "html" as rendering type is the best for that.

I was able to create a relatively clean table element

Anycase .. all the html code is pushed inside the whole mashup management of thingworx (div, css, javascript ...) , and so it is not possible to do a really custom mashup with events/scripts as a normal html file allows.

 

2 replies

16-Pearl
January 22, 2021

Hi @iguerra,

 

Does the custom CSS mentioned in the following article help with the display issue in the HTML TextArea widget as Read-Only ?

In ThingWorx, HTML TextArea widget cannot display table properly in READONLY mode

 

Otherwise the Grid widget can also render HTML code but it might not be ideal if you have only one value to display.

iguerra16-PearlAuthor
16-Pearl
January 26, 2021

Hello @c_lowy 

it fixes partially

 

without readonly it shows table with 100% width (takes all the screen)

with readonly and the CSS I can see the table, but columns/table width is fixed

16-Pearl
January 27, 2021

Hi @iguerra,

 

Indeed, this is not ideal. Note that the HTML TextArea widget has been made Read-Only only starting ThingWorx 9.0.0 and my tests showed that the tables are also properly displayed in that new version of the widget (without any additional CSS).

Community Manager
February 22, 2021

Hi @iguerra.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon