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

Create a mashup with own HTML code

SOLVED
iguerra
Aquamarine

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

Re: Create a mashup with own HTML code

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

Tags (1)
8 REPLIES 8

Re: Create a mashup with own HTML code

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.

Re: Create a mashup with own HTML code

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

Re: Create a mashup with own HTML code

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

Re: Create a mashup with own HTML code

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 ??

Re: Create a mashup with own HTML code

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.

Re: Create a mashup with own HTML code

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. 

 

Re: Create a mashup with own HTML code

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

Tags (1)

Re: Create a mashup with own HTML code

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

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.