Hi,

I am using CKEditor to collect information in a text field.  I am now trying to display that text on a form without the mark-up showing up, but I would like to show the formatted text.  Below is a simple sample of what is returned.


<p><span style="color:#e74c3c">I want this to display as Red.</span></p><br/><br/><p><span style="color:#3498db">And this as blue.</span></p><br/>

I am sure it is something simple, but what do I need in order for that text to display as red and blue

Thank you in advance.

Trav

Solution

Hi Travis,

You can use a expression with the property "escape content" set to "No".

But you need to be careful because users can include <script> tags and harmful code in ckeditor since you aren't escaping the text.

Regards,

Marcelo  

Solution

Thank you for the quick response.

I tried that previously, but then added that EncodeHTML function to the expression as per the warning service studio gave me.  I didn't think to try it without the function.  Clearly I am not a real web developer.  :)

Thank you again!!!

Hi Travis,

EncodeHtml() escapes all the HTML tags. That's why it wasn't working.

Regards,

Marcelo