[CKEditor] How to wrapped in <p></p> blocks
Forge component by Matthias Preuter
Published on 25 Aug 2020
Application Type
Traditional Web

I am using ckeditor to make it easier for users to input HTML. However, the data I get back from ckeditor is wrapped in <p></p> blocks. (Which I don't want.)

In the documentation of CKEditor, it mentions to use "config.enterMode = CKEDITOR.ENTER_DIV". Please advise me how to conifgure it in the outsystem.

Thank in advance

Rank: #537

Hi Jessica,

According to the documentation you need to insert "CKEDITOR.config.clipboard_defaultContentType = 'text';" in the "config" field.

Another alternative is using the action "HtmlToText" in your string before saving it to the database.

Hope this helps,


Rank: #899

I have tried but failed. the content in CKEditor will show the html source. Any ideas?

My configuration as below.

"height: '140px',












CKEDITOR.config.shiftEnterMode = CKEDITOR.ENTER_P,

CKEDITOR.config.autoParagraph = false "

Rank: #537

Hi Jessica,

Have you tried using the "HtmlToText" function?

Rank: #899

I have tried to remove ' <p>' tag in the source before saving it into database. It is okay.

Once i retrieve it from database, CKeditor will automatically added '<p>'  to encapsulate the content.

so weird.

Rank: #110


Below is what I did in demo app for cfg_wcount assignment, I added three configuration

  1. autoParagraph: false
  2. enterMode: 2 (means it will insert <br> when you hit enter key)
  3. ShiftEnterMode: 1 (means it will insert <p> when you kit shit+enter key)

for div the mode value is 3