Opened 17 years ago
Closed 17 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 )
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
Attachments (3)
Change History (9)
Changed 17 years ago by
| Attachment: | test-insertElement.patch added |
|---|
comment:1 Changed 17 years ago by
| Description: | modified (diff) |
|---|---|
| Keywords: | Confirmed added |
Changed 17 years ago by
| Attachment: | 3100.patch added |
|---|
comment:2 Changed 17 years ago by
| Keywords: | Review? added |
|---|---|
| Owner: | set to Garry Yao |
| Status: | new → assigned |
The solution provided by this patch is trying to break parent elements when the insertion is invalid.
comment:3 Changed 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|---|
| Owner: | changed from Garry Yao to Frederico Caldeira Knabben |
| Status: | assigned → new |
This approach (other than lazy ;)) breaks some specific situations. For example:
- Create a table with caption.
- 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 17 years ago by
| Attachment: | 3100_2.patch added |
|---|
comment:4 Changed 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|---|
| Status: | new → assigned |
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.

Functional Test Case