Opened 10 years ago

Closed 9 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:

  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 (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

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

comment:4 Changed 9 years ago by fredck

  • Milestone changed from FCKeditor 2.4 to FCKeditor 2.4.1

comment:5 Changed 9 years ago by fredck

  • Component changed from General to UI : Enter Key

comment:6 Changed 9 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.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy