102
Views
8
Comments
Solved
 CKEditor read HTML data in List
Question

Dear all, 

After i saved some rich text with using CKEditor Reactive in database. How can I retrieve the HTML data from the database and display those data as a list?


Solution

Hi Parko,

I created a demo that shows how to do this. I attached it to this post.

Link: https://vkoning.outsystemscloud.com/ForumCKEditorWithList/Demo?_ts=637233214363832347

Basically I created a Block that has one Container. I then use a piece of javascript to plot text inside this container.

Good luck,

Vincent

ForumCKEditorWithList.oap

CKEditor already creates the needed HTML for you to display the data. 

To display it you need to use an expression with "Escape Content" set to No in Web Traditional 

or

with Reactive/Mobile add a named container to the page and update it's inner html with the following code;

document.GetElementById(<id>).InnerHTML = <html>;


Rank: #45

Parko Cham wrote:

Dear all, 

After i saved some rich text with using CKEditor Reactive in database. How can I retrieve the HTML data from the database and display those data as a list?



Hi Cham,


You can use as per below image in your code.it just for your reference make change as per your logic.

CKeditor.oml

Hi Parko,

I don't really understand what you are trying to do. You say you get user input via CKEditor and by looking at your screenshots this goes as expected. You get the input and you are able to display it. 

But now you also say you want to display it in a list. What kind of list? 

  1. A list of records from an array?
  2. Or a (numbered) list just like this one? And if so, would you determine what needs to be a new line in the list?

Greetings,

Vincent

Solution

Hi Parko,

I created a demo that shows how to do this. I attached it to this post.

Link: https://vkoning.outsystemscloud.com/ForumCKEditorWithList/Demo?_ts=637233214363832347

Basically I created a Block that has one Container. I then use a piece of javascript to plot text inside this container.

Good luck,

Vincent

ForumCKEditorWithList.oap