Opened 14 years ago

Last modified 11 years ago

#5309 closed New Feature

Context sensitive insertHtml — at Version 7

Reported by: Garry Yao Owned by: Garry Yao
Priority: Normal Milestone:
Component: Core : Pasting Version:
Keywords: Cc:

Description (last modified by Garry Yao)

We've seen various paste problems caused by our current implementation of CKEDITOR.editor::insertHtml, now rely on browsers' native API, which is buggy and inconsistent.
While we do have other options here: The idea is to implement an DTD aware, context sensitive insertion based on CKEDITOR.htmlParser' and 'CKEDITOR.editor::insertElement', this should be able to extinguish all weird bugs around.

Related tickets are:

#5696
IE : Cursor moves to the start of paragraph in the Pasted Text

#5367
Implement editor.insertText and use it in the special chars dialog

#5536
Problems with pasting (executing insertHtml) and formatted text

#5170
Problems with pasting (executing insertHtml) and formatted text

#5033
Invalid behavior when inserting nested divs with insertHtml()

#4898
Paste: After pasting a table from word it is not possible to navigate outside the table

#4746
insertHtml left trim text

#3105
insertHtml and insertElement should agree on the result

#2781
FckEditor InsertHtml inserts extra <p> tags

#2749
InsertHtml() is inconsistent between IE 7 and Firefox 2

#2526
InsertHTML Problem

#503
Unordered list paste: doesn't work correctly in IE

Change History (9)

comment:1 Changed 14 years ago by Garry Yao

Component: GeneralCore : Pasting
Description: modified (diff)

comment:2 Changed 14 years ago by Garry Yao

Description: modified (diff)

Minor adjustments.

comment:3 Changed 14 years ago by Garry Yao

Description: modified (diff)

comment:4 Changed 14 years ago by Garry Yao

By checking the insertHtml API in latest HTML5 draft, it also doesn't require a context sensitive insertion:

4. Invoke the HTML fragment parsing algorithm with an arbitrary orphan 'body' element owned by the same Document as the context element and with the value argument as input.

comment:5 Changed 14 years ago by Garry Yao

Milestone: CKEditor 3.3CKEditor 3.4

We're over burdened now so this feature will be deferred to next milestone.

Changed 14 years ago by Garry Yao

Attachment: 5309.patch added

comment:6 Changed 14 years ago by Garry Yao

Description: modified (diff)
Keywords: Confirmed Review? added; Umbrella removed
Owner: set to Garry Yao
Status: newassigned
Type: TaskNew Feature

Ported a simplified version of Firefox's nsHTMLEditor::InsertHTMLWithContext while it supposed to be browser neutral paste implementation.

comment:7 Changed 14 years ago by Garry Yao

Description: modified (diff)

Changed 14 years ago by Garry Yao

Attachment: 5309_2.patch added
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