cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Create a mashup with own HTML code

iguerra
14-Alexandrite

Create a mashup with own HTML code

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

1 ACCEPTED SOLUTION

Accepted Solutions
iguerra
14-Alexandrite
(To:c_lowy)

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.

 

View solution in original post

8 REPLIES 8
c_lowy
16-Pearl
(To:iguerra)

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.

iguerra
14-Alexandrite
(To:c_lowy)

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

c_lowy
16-Pearl
(To:iguerra)

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).

iguerra
14-Alexandrite
(To:c_lowy)

But I have thingworx 8.5.9 and upgrade is not planned in few time

and I have the flag to set readonly the HTML text area ...

may be I should play with CSS ??

c_lowy
16-Pearl
(To:iguerra)

I am currently making some tests and research to see if this can be achieved using custom CSS. I will get back to you on that point.

c_lowy
16-Pearl
(To:c_lowy)

Hi @iguerra,

 

I unfortunately have not been able to find a CSS syntax that would make the HTML table stretch across the container in 8.5. 

 

I know that is it not the most convenient solution, but if you define your HTML content as a column of an infotable and display that into an Advanced Grid, you can choose to display the HTML content with formatting and the grid cell at least will be stretched across the container. However the table itself might not so depending on the display intent the HTMLTextArea might still be preferred. 

 

iguerra
14-Alexandrite
(To:c_lowy)

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.

 

slangley
23-Emerald II
(To:iguerra)

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

Top Tags