Opened 15 years ago

Closed 15 years ago

#3526 closed Task (fixed)

Implement Ignore Empty Paragraph feature

Reported by: Garry Yao Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: Confirmed Review+ Cc:

Description

After #3189 and #3190, empty paragraphs might get inserted in the document without user's intension, so clean up those empty blocks is necessary on output data.

Attachments (3)

3526.patch (1.2 KB) - added by Garry Yao 15 years ago.
3526_2.patch (2.1 KB) - added by Garry Yao 15 years ago.
3526_3.patch (1.2 KB) - added by Garry Yao 15 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 15 years ago by Garry Yao

Status: newassigned
Type: BugTask

comment:2 Changed 15 years ago by Garry Yao

Keywords: Review? added

Changed 15 years ago by Garry Yao

Attachment: 3526.patch added

comment:3 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

We don't need really to remove all empty paragraphs. We're talking about the IgnoreEmptyParagraphValue setting we have in V2 today, which indicates that the editor value must be empty if we just have an empty paragraph inside of it.

Also, we have also some change on #3439.

I think this fix should go in the getData function of the wysiwygarea plugin, checking the data even before calling the data processor.

comment:4 Changed 15 years ago by Garry Yao

Keywords: Review? added; Review- removed

Certain differences with v2:

  1. We should consider all empty block as paragraph;
  2. It's easier to have data processor to help with trimming empty inline elements, now we just need to consider spaces, &nbsp; and <br/>, later, we may even only need to consider spaces.

Changed 15 years ago by Garry Yao

Attachment: 3526_2.patch added

Changed 15 years ago by Garry Yao

Attachment: 3526_3.patch added

comment:5 in reply to:  4 Changed 15 years ago by Garry Yao

Replying to garry.yao:

Certain differences with v2:

  1. We should consider all empty block as paragraph;

No, the fixing should dedicate to paragraph-like block elements only.

comment:6 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

The fix is ok. I would ask you to just move the regex declaration to the very beginning of the plugin code when committing, so it doesn't need to be recreated every time the inner function get executed.

comment:7 Changed 15 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [3645].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy