#9754 closed Bug (fixed)
Cut/paste simple unformatted text generates inline wrapper in Webkits
Reported by: | Ronald | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.0.1 |
Component: | Core : Pasting | Version: | 4.0 |
Keywords: | Webkit | Cc: |
Description
When I cut and paste a really simple piece of text within the CKEditor (that is, no MSWord or other source is being used), still additional formatting is added in Google Chrome.
Reproduction scenario in Google Chrome v23:
- Enter the text 'Test'
- Verify in the CODE view that your code is <p>Test</p>
- Go back to wysiwyg view
- Cut the letter 'e' using Ctrl+X
- Paste it anywhere (eTst, Test, Tset, Tste)
- Go to CODE view again; note that a <font> tag has been added. Ffor example: <p>T<span style="font-size: 13px;">e</span>st</p>
Expected behaviour (yep, I know Chrome makes this harder):
- No additional formatting should be generated in general
- Especially when cutting and pasting at the same position, the result should be the original text without changes
This bug is reproducable in nightly build demo (http://nightly.ckeditor.com/3998/samples/replacebyclass.html)
Change History (8)
comment:1 Changed 12 years ago by
Keywords: | Chrome added |
---|---|
Status: | new → confirmed |
comment:2 Changed 12 years ago by
Keywords: | Webkit added; Chrome removed |
---|---|
Milestone: | → CKEditor 4.0.1 |
You're right that Webkits (Safari and Chrome are affected) make this hard. In fact they make it impossible to find out if pasted styles should be stripped or kept by us. The only thing we can do is stripping everything and that is not a good solution, because styles applied by the user will be lost too ;|.
Fortunately I know that we haven't got this problem few weeks ago, so I was able to find first bad commit git:ad89556. We'll have to try to restyle editor or find better place for pastebin, so Webkit won't be applying styles which differ between origin and destination.
comment:3 Changed 12 years ago by
Summary: | Cut/paste simple unformatted text generates <font> tag in Chrome → Cut/paste simple unformatted text generates inline wrapper in Webkits |
---|
comment:4 Changed 12 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → review |
Pushed git:d8221c1 (t/9754).
To fix this issue we need to style pastebin like editable. To achieve that we can either add .cke_editable
class to it or add #cke_pastebin
to rule for .cke_editable
in contents.css.
Second solution makes contents.css less clear and it mixes plugin's specific stuff into core. So the only decent way is the first one.
comment:6 Changed 12 years ago by
Status: | review → review_passed |
---|
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Masterised git:76f93c9.
This is Chrome only issue reproducible from CKEditor 4.0. It didn’t occur in 4 beta.