Opened 14 years ago
Closed 14 years ago
#6588 closed Bug (fixed)
Copy and paste adds <span> if SCAYT is enabled
Reported by: | Andy | Owned by: | Sa'ar Zac Elias |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.4.3 |
Component: | UI : Spell Checker | Version: | 3.4.2 |
Keywords: | Cc: | WebSpellChecker.net |
Description
Copying something with a 'spelling' error ( eg CKEditor ) generates extra code when it is pasted in HTML view mode with SCAYT enabled.
The source code <p>CKEditor</p> will lead to <p><span>CKEditor</span></p>.
Error consistently reproducible in Firefox 3.6.12 on Windows and Linux.
Cannot reproduce in IE8 or Chrome.
This is only an issue (for me) when wiki style links are copied and pasted. It messes with things such as [[spelling: eror]], leading to [[spelling: <span>eror</span>]]
Many thanks for your time and for CKEditor, it's awesome!
Attachments (4)
Change History (19)
comment:1 Changed 14 years ago by
Cc: | WebSpellChecker.net added |
---|---|
Component: | General → UI : Spell Checker |
Keywords: | Firefox added |
Status: | new → pending |
comment:2 Changed 14 years ago by
Keywords: | Confirmed added |
---|
We can confirm this on ckeditor.com/demo
Steps to reproduce:
- Open ckeditor.com/demo
- Paste any text from Wikipedia with some unknown words
- Enable SCAYT and wait until it underlines unknow words
- Ctrl+A, then Ctrl+C
- Open ckeditor.com/demo once more, e.g. in another tab
- Paste copied text
- Go to "Source" mode
Actual result:
Misspelled words are wrapped in <span>s.
Expected result:
Source code is the same for both CKEditor tabs.
comment:3 Changed 14 years ago by
Keywords: | Confirmed removed |
---|---|
Status: | pending → confirmed |
I can confirm that also on IE.
comment:4 Changed 14 years ago by
Keywords: | Firefox removed |
---|
@SpellCheck.net First of all we have no control over clipboard data, so to help us (and browsers) to properly filtering SCAYT marker when pasting, a valid HTML attribute has to take place, e.g. class="scayt".
comment:5 Changed 14 years ago by
Yes, we plan to add some filtering to the CKEditor core module to filter <span>s with "scayt_word" or "scaytid" attributes.
Changed 14 years ago by
Attachment: | 6588.patch added |
---|
comment:6 Changed 14 years ago by
Keywords: | HasPatch Review? added |
---|---|
Version: | 3.4.1 → 3.4.2 |
We have managed to fix this in plug-in. Here is patch. Please, review.
comment:7 Changed 14 years ago by
Milestone: | → CKEditor 3.4.3 |
---|
The patch looks correct, with some code rewriting.
Changed 14 years ago by
Attachment: | 6588_2.patch added |
---|
comment:8 Changed 14 years ago by
Keywords: | HasPatch Review? removed |
---|---|
Owner: | set to Garry Yao |
Status: | confirmed → review |
comment:9 Changed 14 years ago by
Status: | review → review_failed |
---|
Sorry I'm mis-leading here, the right way of fixing this is instead prefixing all SCAYT custom attributes (e.g. scayt_word) with 'data-', check #6334 for more information.
comment:10 Changed 14 years ago by
Owner: | Garry Yao deleted |
---|---|
Status: | review_failed → new |
comment:11 Changed 14 years ago by
Status: | new → confirmed |
---|
comment:12 Changed 14 years ago by
Keywords: | HasPatch Review? added |
---|
We have followed your instructions and added the prefix 'data-' to all SCAYT custom attributes. In order to get it work please switch SCAYT plug-in to use SCAYT core 2.6(Ticket: #6769). Please, review.
Changed 14 years ago by
Attachment: | 6588_3.patch added |
---|
Changed 14 years ago by
Attachment: | 6588_4.patch added |
---|
comment:13 Changed 14 years ago by
Keywords: | Review? removed |
---|---|
Owner: | set to Sa'ar Zac Elias |
Status: | confirmed → review |
Making some code rewriting to your patch.
comment:14 Changed 14 years ago by
Status: | review → review_failed |
---|
There' s no need of doing data filtering, it doesn't affect wysiwyg.
comment:15 Changed 14 years ago by
Keywords: | HasPatch removed |
---|---|
Resolution: | → fixed |
Status: | review_failed → closed |
Fixed with [6169].
I'm unable to reproduce your problem. Are you able to reproduce the bug on the samples of the SVN or the nightly build? If not, Please attach or link us to the page you're using.