[CKEditor] Formatting Issue

[CKEditor] Formatting Issue

  
Forge Component
(11)
Published on 12 Oct by OutSystems Labs
11 votes
Published on 12 Oct by OutSystems Labs
Hi All,

I have 2 screens both using CKEditor.
If I create an entry on screen 1 i.e:

Hello World

Hello World..!

It renders fine...

If I try to show this same text on screen 2 (pulling from the DB) I get unformatted text displayed:

 
<h1><span style="font-family:verdana,geneva,sans-serif">Hello World</span></h1>

<p>Hello World..!</p>


Really odd... what am I missing..!?

Thanks
Gary

 

 
Hi Gary,

Have you set the Unescaped property of the expression set to true? (knowing the security consequences of that, of course ;) )

Regards,
João Rosado
Thanks yes that does work, but I thought text pulled back through CKEditor would do the formatting..?
Not really, text is just text, all formatting is done in html.
CKEditor just "hides" it from you. Try it here, format something and click on the "Source" button. That is the text generated behind the scenes. So to actually display it formatted on the page you need to write html directly.

Regards,
João Rosado
Thank you... I've added a test app here to show you what I mean..
https://temples.outsystemscloud.com/TEST/
Select a 'ToDo' and you'll see the CKEditor box with correctly displayed text. There's a link at the bottom that goes to another screen that shows the same text in a new CKEditor box... you'll see that all the formatting is wrong..?
Thanks
Gary
OML here...
Ha, I see...

Try switching the expression to a Input.
CKEditor is expecting an "InputId" and not a expression id.

So:
If you want to put the text directly on a page, use an Expression.
If you want to edit it again in another CKEditor, use an Input.

Regards,
João Rosado
I am having a similar issue, CKeditor is working fine, but when I define a Show Record, it renders as full text with html showing,  I am using an expression to get it.  I have attached an example, go to the Descriptions menu item and you will see a list, and a show record item.  Click on the item it shows in CKeditor fine, just not in the show Record.

Allen