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 Frederico Caldeira Knabben)

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 18 years ago by Frederico Caldeira Knabben

Description: modified (diff)

comment:2 Changed 18 years ago by Frederico Caldeira Knabben

Summary: Can NOT create <p> tag in <div> tag (version 2.4 )Unable to create <p> inside <div>

comment:3 in reply to:  description Changed 18 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.4
Version: 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 18 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.4FCKeditor 2.4.1

comment:5 Changed 18 years ago by Frederico Caldeira Knabben

Component: GeneralUI : Enter Key

comment:6 Changed 18 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

Fixed with [201].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy