Question

Show HTML in Previewer in Universal GUI

  • 23 November 2022
  • 8 replies
  • 82 views

Userlevel 4
Badge +14

It seems like not possible to show HTML in the previewer component in Universal.

Is this not yet possible in the Universal GUI or can it be realized in another way?

See below an example of a HTML page shown in de Windows GUI versus Universal

 

Universal:

 


8 replies

Userlevel 4
Badge +5

Hi @Harm Horstman

I am assuming you have a HTML field here. I think you can achieve it using a cardlist component and set up the card list to only show the HTML field. If I remember correctly it will automatically adjust its height to the contents. 

Userlevel 4
Badge +14

Hello @Freddy,

 

Thanks, for the tip. That would be great, I will give it a try.

 

 

Userlevel 4
Badge +14

@Freddy,

I've tried it and it looks promising. However, one problem, long texts are is not wrapped properly.

Do you have experience with this problem? And have you already found a solution for it?

 

 

Userlevel 4
Badge +5

@Harm Horstman yes you can do that with custom CSS. 

 

 white-space: normal !important;

@tiago can you confirm it was this CSS part that made word-wrapping a reality? 

Userlevel 4
Badge +14

@Freddy 

Nice, but can you give me a full example of how your custom.css looks like?

Userlevel 4
Badge +5

@Freddy

Nice, but can you give me a full example of how your custom.css looks like?

 

Add the following to your custom CSS, maybe it works straight out of the box :)

.cardlist-item-container .cardlist-item__value, .css-4f29yv .cardlist-item-container .cardlist-item__label, .css-4f29yv .cardlist-item-container .cardlist-item__value > *, .css-4f29yv .cardlist-item-container .cardlist-item__label--checkbox {
white-space: normal !important;
}

 

Userlevel 4
Badge +14

Thank you @Freddy, but unfortunately this doesn't seem to be the solution, maybe @ServiceAndCare ( @Jeroen van den Belt ) can give answers?

Userlevel 5
Badge +4

Hi Harm,

It is indeed not supported yet to feed the preview component html text to show. This is still open on our backlog for the Universal GUI.

As a workaround you can think of a cardlist or a form with a single (html) column, linked as a detail to this subject using a 1-on-1 self-reference. Or saving the html text to a file and link it to a url control, where the preview component is bound to. 

We understand this is all not ideally.

Best regards,
Erik

Reply