Opened 18 years ago
Closed 18 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 )
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 18 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 18 years ago by
Summary: | Can NOT create <p> tag in <div> tag (version 2.4 ) → Unable to create <p> inside <div> |
---|
comment:3 Changed 18 years ago by
Milestone: | → FCKeditor 2.4 |
---|---|
Version: | → SVN |
comment:4 Changed 18 years ago by
Milestone: | FCKeditor 2.4 → FCKeditor 2.4.1 |
---|
comment:5 Changed 18 years ago by
Component: | General → UI : Enter Key |
---|
comment:6 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed with [201].
Click here for more info about our SVN system.
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>).