3
Views
8
Comments
Any widget to include html code to page?
Question
hi,

I am implementing some page. There have few HTML code segment need to embeded to page. I was able to use Expression and set encode content to no to display HTML but at the design time. it only show html code which is very ugly and hard to work with other elements on page. is there a widget to render html at design time?

Truong
2016-04-21 18-13-58
Nuno Rolo
 
MVP
Hi Truong,

That i have knowledge no!
2012-03-02 13-17-21
Paulo Ramos
Staff
Hi Truong,
Not sure if I understood you correctly... You managed to add html content via an unescaped expression, but now it's breaking the layout of the screen in Service Studio (in design mode) - is this right? If that's the case, you can use the Example property (in the expression) to hide the real content (set it to "<html...>" or something like that).
UserImage.jpg
Truong Nguyen
No, I can use  Example property to hide it. but i can not see the css applied for my HTML.
2020-08-05 08-52-58
Ruben Goncalves
Hi Truong,

Adding html to your pages that way, it's definitely not the best approach, since you're compromising the maintainability of your code.....
Nevertheless, one of the aproaches is to create a webblock, put and if  (with the condition false), and on the true part put a screenshot of the preview and on the false the actual code:


But once again.... avoid as much as possible this approach (html on unexcaped).

Cheers,

RG
UserImage.jpg
Truong Nguyen

Thanks, 
I have already known about using Conndition true- false to hidden html in expression. But What i need it i can see how  my html display on page like it is displayed at run time.
2020-08-05 08-52-58
Ruben Goncalves
You got me confused... 
If you still have a problem, can you explain it again? :S
2013-10-09 15-42-10
Kvark
He would like to have WYSIWYG mode :) 
2012-03-02 13-17-21
Paulo Ramos
Staff
Currently, Service Studio won't preview unscaped expressions...
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.