Opened 15 years ago
Closed 14 years ago
#5536 closed Bug (fixed)
Problems with pasting (executing insertHtml) and formatted text
Reported by: | Wiktor Walc | Owned by: | Tobiasz Cudnik |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.5 |
Component: | General | Version: | 3.2.1 |
Keywords: | Firefox | Cc: |
Description
This is actually a duplicate of #5170, but since that ticket was already reviewed and committed, here's another one (I guess [5273] should be reverted as the issue was misunderstood).
Note that this bug occurs when pasting any content, this is not an issue that exists only when pasting special character.
Updated description below:
When inserting content with insertHtml() inside of formatted text, editor breaks formatting and inserts content without formatting. Confirmed in FF 3.5. Works fine in IE8 and Safari 4.
Steps to reproduce
- open _samples/api.html example
- start with
<p> <span style="color: rgb(255, 0, 0);">Sample ^text</span></p>
- clear the textarea below CKEditor and type there "foo"
- press "Insert HTML"
- Result:
<p> <span style="color: rgb(255, 0, 0);">Sample </span>foo<span style="color: rgb(255, 0, 0);">text</span></p>
This can be reproduced in many different ways in CKEditor, everywhere where insertHtml() is used.
Targetting to 3.3 as it might be a bit irritating.
Attachments (1)
Change History (14)
comment:1 Changed 15 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | new → assigned |
comment:2 Changed 15 years ago by
Milestone: | CKEditor 3.3 → CKEditor 3.4 |
---|
comment:3 Changed 15 years ago by
Owner: | Garry Yao deleted |
---|---|
Status: | assigned → new |
We'll be working on this at #5309.
comment:4 Changed 15 years ago by
Milestone: | CKEditor 3.4 → CKEditor 3.5 |
---|
comment:5 Changed 15 years ago by
Owner: | set to Tobiasz Cudnik |
---|---|
Status: | confirmed → assigned |
comment:6 Changed 14 years ago by
Keywords: | Firefox added |
---|
Changed 14 years ago by
Attachment: | 5536.patch added |
---|
comment:7 Changed 14 years ago by
Status: | assigned → review |
---|
This is temporally fix before #5309 will be finished.
comment:8 Changed 14 years ago by
Status: | review → review_failed |
---|
A temporary fix would not be a catch-all that replace entirely the original, but instead targeting only this specific case.
comment:9 Changed 14 years ago by
What would be a more specific case for this issue than targeting only Firefox ?
comment:11 Changed 14 years ago by
Browsers (especially Firefox) deliver context-based fixes on 'insertHtml', examples like pasting list and tables. The problem here is with text node only, the patch fixes this specific case here while it could potentially breaks even more, in case an emergent fix is really required, it should be well surged.
comment:12 Changed 14 years ago by
Milestone: | CKEditor 3.4.2 → CKEditor 3.5 |
---|
Defer this ticket to 3.5, if #5309 is not completed in 3.5, at least we could have this one as backup.
comment:13 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_failed → closed |
Now that we've reworked the editor::insertText method which should be relied on instead for inserting plain text (where styles context are inherited).
Ok, let's try to provide a managed the 'paste' command with our own logics.