#546 closed Bug (invalid)
The editor creates inside p after an enter key
Reported by: | Alain | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | UI : Enter Key | Version: | SVN (FCKeditor) - Retired |
Keywords: | Cc: |
Description
juste type Enter key, and then click on the source button, you will have <p> </p> or <p> </p> depending on ProcessHTMLEntities var which is not normal I think ! related bugs are 243 267 and 71 :
Change History (8)
comment:1 Changed 17 years ago by
Keywords: | Pending added |
---|---|
Milestone: | FCKeditor 2.5 |
Summary: | The editor still create invalid nested block elements, like creating <form> or <hr> inside <p>. after a enter key → The editor still create invalid nested block elements, like creating form or hr inside p after a enter key |
comment:2 Changed 17 years ago by
Path: . URL: http://svn.fckeditor.net/FCKeditor/trunk Repository Root: http://svn.fckeditor.net Repository UUID: da63caf2-3823-0410-a1e8-d69ccee00dfb Revision: 365 Node Kind: directory Schedule: normal Last Changed Author: alfonsoml Last Changed Rev: 365 Last Changed Date: 2007-06-09 12:15:26 +0200 (Sat, 09 Jun 2007)
firefox 2.0.0.4 / explorer 7.5730.11 under WinXP or firefox 2.0.0.4 under linux centos-3 to reproduce type in _samples\default.html: (editor with all features) """ hello world
bingo
"""
then toggle to source code:
""" <p>hello world</p> <p> </p> <p> bingo</p> <p> </p> """
comment:3 Changed 17 years ago by
I don't see any form or hr there. Could you explain better what's the problem?
comment:4 Changed 17 years ago by
the problem for me is the " " or " " insertion between <p></p> ! while a simple space character that can be inserted instead. is it normal to have the instead off a space character ? if not than ok but it's weerd. this cause some problems when decoding html into wiki websites ...
Note: Oh by the way sorry for the tittle . forgate the "form or hr inside p after a enter key" part, I wasin't able to change the title after creation the bug !
comment:5 Changed 17 years ago by
Keywords: | Pending removed |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Summary: | The editor still create invalid nested block elements, like creating form or hr inside p after a enter key → The editor creates inside p after an enter key |
That's the proper behavior to make browsers happy.
You can set
FCKConfig.FillEmptyBlocks = false ;
then it might not be easy to put the cursor inside those empty elements, but you won't get the s
comment:6 follow-up: 8 Changed 17 years ago by
Ok fine, but I have two notes:
- why puting a instead of " " (a simple white space characters)
- even with FCKConfig.FillEmptyBlocks = false ; it's better but not perfect :
type "hello" followed by Enter, then "toto" followed by Enter, then a Space, then toggle to source. a will appear. """ hello
toto
""" --> """ <p>hello<br /> coucou<br /> </p> """ NB: if you think that this area is not the right place to have this discussion please let me know Thanks
comment:7 Changed 17 years ago by
The reason for adding is quite simple. Just create two html pages. In one of them, place the following code:
<p> </p> <p> </p> <p> </p> <p> </p> <p>Last P</p>
In the other, try with the :
<p> </p> <p> </p> <p> </p> <p> </p> <p>Last P</p>
Open both pages... the difference is obvious.
If for some reason you really don't want them, it is not a big issue to replace all occurrences with a simple space, right?
comment:8 Changed 17 years ago by
Replying to leelouch:
Ok fine, but I have two notes:
- why puting a instead of " " (a simple white space characters)
- even with FCKConfig.FillEmptyBlocks = false ; it's better but not perfect :
type "hello" followed by Enter, then "toto" followed by Enter, then a Space, then toggle to source. a will appear.
There would be no ways to represent the space that "you have typed" otherwise. Spaces in HTML has no value other than separating characters or objects.
Please, provide detailed steps to reproduce, including the browser that you're using. It seems to work fine for me in the trunk.