Opened 10 years ago
Closed 10 years ago
#99 closed Bug (fixed)
Unable to create <p> inside <div>
| Reported by: | tba21cn | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | FCKeditor 2.4.1 |
| Component: | UI : Enter Key | Version: | SVN (FCKeditor) - Retired |
| Keywords: | Cc: |
Description (last modified by fredck)
Test step:
- EnterMode='p' in config.js
- have this content in "source" view: <div>abc</div>
- in fckeditor view, put the cursor after 'ab', and press enter.
- Check content in "source" view,
Result:
<div>ab</div> <div>c</div>
There is NO <p> tag as expected.
So there is NO way to create a <p> tag in <div> tag, and there is no way to create a <div> tag in <p> tag.
<div>abc</div> always get <div> when press Enter, doesn't matter EnterMode;
<p>abc</p> always get <p> when press Enter, doesn't matter EnterMode;
Change History (6)
comment:1 Changed 10 years ago by fredck
- Description modified (diff)
comment:2 Changed 10 years ago by fredck
- Summary changed from Can NOT create <p> tag in <div> tag (version 2.4 ) to Unable to create <p> inside <div>
comment:3 in reply to: ↑ description Changed 10 years ago by fredck
- Milestone set to FCKeditor 2.4
- Version set to SVN
comment:4 Changed 10 years ago by fredck
- Milestone changed from FCKeditor 2.4 to FCKeditor 2.4.1
comment:5 Changed 10 years ago by fredck
- Component changed from General to UI : Enter Key
comment:6 Changed 10 years ago by fredck
- Resolution set to fixed
- Status changed from new to closed
Fixed with [201].
Click here for more info about our SVN system.
Note: See
TracTickets for help on using
tickets.

Replying to tba21cn:
The current implementation sees a <div> as a block tag, that therefore must be repeated when hitting enter. Actually, <div> may also work as a block container tag, so if EnterMode=p, we expect to have <p> tags inside <div>s.
While creating <p>s inside <div>s is correct (and we must correct it), the creation of <div>s inside <p>s is incorrect (by W3C definition). So, in the former case, you will still have a <p> being duplicated (you can then use the Format combo to change it to a <div>).