Opened 14 years ago
Closed 14 years ago
#7607 closed Bug (wontfix)
Style attribute is deleted from the sourcecode while switching from Source to WYSIWYG
Reported by: | tiago ferreira | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.0 |
Keywords: | CantFix | Cc: |
Description
In version 2.X or 3.X of CKEditor, the "style" attribute is deleted from the sourcecode while switching from Source to WYSIWYG. On FCKeditor latest version (and nightly build), the problem is solved for Fire Fox and Chrome, but remains in IE (tested in the Demo at CK website).
A small test case would be, using IE6 or above (with WinXP or above):
- Move to Source view on the Editor;
- Add following html code:
<div class="test" style="#styleTest#"> test </div>
- Move to WYSIWYG view;
- Move back to Source view.
Note that if the style attribute includes regular css expressions it works just fine. I've tested it by replacing the code on step 2 for:
<div class="test" style="background-color: red"> test </div>
Thanks in advanced,
Tiago
Change History (4)
comment:1 Changed 14 years ago by
Keywords: | Clearing Style Attribute IE removed |
---|---|
Status: | new → confirmed |
Version: | 3.5.3 → 3.0 |
comment:2 Changed 14 years ago by
Hi j.swiderski, thanks for your time, reviewing the ticket! Do you think this bug is going to be fixed to IE? Is that a lot of people uses the browser and it's kind of an interesting feature.
Best regards, Tiago
comment:3 Changed 14 years ago by
I’ve based my judgment on a simple test. I have prepared a HTML page with a sample code (I did not use CKEditor):
<body contenteditable="true"> <div class="test" style="#styleTest#"> test </div> </body>
All browsers behaved just like described above.
If any one else from CKEditor core development team confirms that it's a browser dependable issue than it may (not necessarily) be treated as "won't fix". If it's not browser dependable than it most likely will be fixed.
comment:4 Changed 14 years ago by
Keywords: | CantFix added |
---|---|
Resolution: | → wontfix |
Status: | confirmed → closed |
The problem here is that we feed the browser with the provided HTML. The browser itself cleanup invalid HMTML, so the style attribute is dropped.
There is nothing we can do here. My recommendation would be using a style syntax that is acceptable by the browser.
I will confirm this ticket just in case but it looks like browser dependable.
In FF4, webkit, Opera - the code stays untouched.
In FF3.6 the contents of style attribute are removed but the attribute itself stays untouched.
In IE whole attribute is removed.
It has worked that way from CKEditor 3.0.