Ticket #99 (closed Bug: fixed)

Opened 21 months ago

Last modified 21 months ago

Unable to create <p> inside <div>

Reported by: tba21cn Owned by:
Priority: Normal Milestone: FCKeditor 2.4.1
Component: UI : Enter Key Version: SVN
Keywords: Cc:

Description (last modified by fredck) (diff)

Test step:

  1. EnterMode='p' in config.js
  2. have this content in "source" view: <div>abc</div>
  3. in fckeditor view, put the cursor after 'ab', and press enter.
  4. 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

  Changed 21 months ago by fredck

  • description modified (diff)

  Changed 21 months ago by fredck

  • summary changed from Can NOT create <p> tag in <div> tag (version 2.4 ) to Unable to create <p> inside <div>

in reply to: ↑ description   Changed 21 months ago by fredck

  • version set to SVN
  • milestone set to FCKeditor 2.4

Replying to tba21cn:

There is NO <p> tag as expected.

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.

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.

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>).

  Changed 21 months ago by fredck

  • milestone changed from FCKeditor 2.4 to FCKeditor 2.4.1

  Changed 21 months ago by fredck

  • component changed from General to UI : Enter Key

  Changed 21 months ago by fredck

  • status changed from new to closed
  • resolution set to fixed

Fixed with [201].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.