Opened 5 years ago

Closed 5 years ago

#12247 closed Bug (invalid)

CKEditor is not converting the user data to html when we set enterMode = 2

Reported by: Senthil Owned by:
Priority: Normal Milestone:
Component: Core : Editable Version: 4.3
Keywords: Oracle Cc: Senthil

Description

We recently added the enterMode = 2 to avoid the issue of getting empty paragraphs "<p>&nbsp;</p>" while copying the data from the word document.

Due to this change editor behaviour is changed,

When the enterMode = 1:

  • User enter the data as "Test Data"
  • Editor converts that as "<p>Test Data<p>"

When the enterMode = 2:

  • User enter the data as "Test Data"
  • Editor doesn't converts the data to html and just keep it as simple text "Test Data".

Due to this behaviour change, our parser code getting impacted and throwing error due to the Text data input. And this issue is only happening when the editor is empty and once we do form post and load the data from the database then it is converting the data to Html. This needs to be fixed asap as it is escalated from our customer.

Since our customers are in CKEditor 4.3 and CKEditor 3.6.2, please provide the fix on these code lines.

Change History (2)

comment:1 Changed 5 years ago by Senthil

Please raise the priority for this ticket as it is escalated by the Oracle customer.

comment:2 Changed 5 years ago by Wiktor Walc

Resolution: invalid
Status: newclosed

This ticket describes the expected behavior of CKEditor when config.enterMode is set to CKEDITOR.ENTER_BR. This is how CKEditor works by design and this is not a bug.

When CKEDITOR.ENTER_BR is used CKEditor does not wrap entered content with <p> or <div> tags, because CKEDITOR.ENTER_P and CKEDITOR.ENTER_DIV are designed for that. CKEDITOR.ENTER_BR should result in text that isn't wrapped by any tags and when enter key is pressed, the <br> element is inserted to break line.

So, by design, entering "Test Data" in WYSIWYG mode should result in "Test Data". Entering "Test Data ENTER Sample text" should result in "Test Data <br> Sample text".

Changing the behavior of CKEditor with enter mode CKEDITOR.ENTER_BR, which has been working this way for years, will break all existing installations of CKEditor. Additionally, this will be quite confusing, because when someone changes the enter mode from P to BR he rather expects to get rid of <p> tags.

If there is a problem with pasting content from Word document, please report it and we'll have a look at it.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy