#7512 closed Bug (invalid)
ckeditor accidently/wrongly creates class tags for all child items in a div
Reported by: | spriebe | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.5.2 |
Keywords: | Cc: |
Description
I've the following code:
<div class="main-holder main-holder-2"> HEADER TEXT </div>
When i now select the HEADER and press H3 style the code gets:
<div class="main-holder main-holder-2"> </div> <h3 class="main-holder main-holder-2">HEADER</h3> <div class="main-holder main-holder-2"> TEXT </div>
But that's def. wrong / bad it should be:
<div class="main-holder main-holder-2"> <h3>HEADER</h3> TEXT </div>
Greets Stefan
Change History (3)
comment:1 Changed 14 years ago by
Keywords: | CSS DIV SUBCLASS removed |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 14 years ago by
please reopen this bug. I've again successfully reproduced it while editing a whole page. My examples are abolutely correct.
The result is exactly this (copy & paste):
div class="main-holder main-holder-2"> #START#</div> <h3 class="main-holder main-holder-2"> HEADER</h3> <div class="main-holder main-holder-2"> TEXT<br /> <br /> BLA BLUB TEST<br /> <br /> #ENDE#</div>
and the start was:
div class="main-holder main-holder-2"> #START#<br /> HEADER<br /> TEXT<br /> BLA BLUB TEST<br /> #ENDE#</div>
I think this should be reopend or is this really the expected behaviour?
comment:3 Changed 14 years ago by
Your example can be reproduced when enter-mode is set to BR. In this mode, part of code HEADER<br /> is treated like "separate block of code" and that is why it is surrounded with H3 and code above and below is wrapped in DIVs.
If enter-mode is set to P or DIV than whole block is chcanged to H3.
But once again this is how CKEditor works. If you want to achieve the result you are looking for than code HEADER<br /> should be wrapped around in P tags like this:
<div class="main-holder main-holder-2"> #START#<br /> <P>HEADER<br /></P> TEXT<br /> BLA BLUB TEST<br /> #ENDE#</div>
I assume the code you had in source mode was:
You have selected 'HEADER' and whole 'div' has changed to 'h3' element. This is not a bug, this is how CKEditor works by default. It changes one block element to another.