Opened 15 years ago

Closed 15 years ago

#3100 closed Bug (fixed)

plugin:wysiwyg should have dtd check on insertElement

Reported by: Garry Yao Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 3.0
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Review+ Cc:

Description (last modified by Garry Yao)

CKEDITOR.editor::insertElement is about introducing changes to the document, which need to make sure the schema are satisfied. The functional test reproduce a typical case of this when inserting a table failed within list items.

Related tickets

#3097

Attachments (3)

test-insertElement.patch (4.7 KB) - added by Garry Yao 15 years ago.
Functional Test Case
3100.patch (1.2 KB) - added by Garry Yao 15 years ago.
3100_2.patch (4.4 KB) - added by Frederico Caldeira Knabben 15 years ago.

Download all attachments as: .zip

Change History (9)

Changed 15 years ago by Garry Yao

Attachment: test-insertElement.patch added

Functional Test Case

comment:1 Changed 15 years ago by Garry Yao

Description: modified (diff)
Keywords: Confirmed added

Changed 15 years ago by Garry Yao

Attachment: 3100.patch added

comment:2 Changed 15 years ago by Garry Yao

Keywords: Review? added
Owner: set to Garry Yao
Status: newassigned

The solution provided by this patch is trying to break parent elements when the insertion is invalid.

comment:3 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
Owner: changed from Garry Yao to Frederico Caldeira Knabben
Status: assignednew

This approach (other than lazy ;)) breaks some specific situations. For example:

  1. Create a table with caption.
  2. Inside the caption text, try to include an horizontal rule... BANG, the table is broken.

There is a different approach for it. I have coded it already, so I'm taking over the ticket.

Changed 15 years ago by Frederico Caldeira Knabben

Attachment: 3100_2.patch added

comment:4 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed
Status: newassigned

The provided patch is much simpler. It breaks the parent tree until the "blockLimit" is not reached. It also ignores unknown elements.

It includes a related fix regarding the caret position after the insertion. I've borrowed the code to be introduce by #3083 for it.

comment:5 Changed 15 years ago by Garry Yao

Keywords: Review+ added; Review? removed

It's a wonderful fix.

comment:6 Changed 15 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

Fixed with [3195].

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