Editor adds extra "<p> </p>" tag at end of code
Joshua Martin - January 26, 2008 - 22:55
| Project: | FCKeditor - WYSIWYG HTML editor |
| Version: | 5.x-2.0-beta |
| Component: | User interface |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
Using module 5.x-2.0-beta and FCK 2.5 as instructed -
The CORRECT source code looks like this -
text here
but every time I switch to source view, FCK adds an unwanted P tag at the end -
text here
could somebody explain why FCK is adding the extra p tag at the end?
or even better - how can I fix so my code will not get damaged?
and please do not suggest changing FCKConfig.EnterMode to 'br' ... obviously hitting the ENTER key should create a PARAGRAPH, but SWITCHING TO SOURCE VIEW should NOT create empty paragraphs
this is urgent, in the sense that Drupal needs a stable WYSIWYG editor which does not damage source code

#1
CORRECT SOURCE CODE:
<div>text here</div>INCORRECT AFTER SWITCH TO SOURCE VIEW:
<div>text here</div><p> </p>as above
#2
What browser and which version of FCKeditor (the editor, not the FCKeditor module) are you using?
FCKConfig.EnterMode is set to
<p>?#3
I'm seeing the same behavior using FF 2.0.0.11 on a Mac. Enter mode is set to
. Using the latest version of FCKEditor, 2.5 I believe.
#4
I've got the same problem, each of my FCKeditor textareas outputs an additional
<p> </p>Version 2.5.1 of FCKeditor
Additionally, I seem to get this when ending a textarea with a OL or UL, but if I end it with a P, it doesn't happen.
#5
I’m seeing the same exact behavior with Drupal 6.1, FCKEditor module 6.x-1.1, FCKEditor 2.5.1 on Firefox 2.0.0.12 and 3.0b4.
#6
I upgraded to FCKEditor 2.6 Beta. That fixed the extraneous insertion of
,<p></p>and<div></div>code (using Drupal 6.1 and FCKEditor module 6.x-1.1).#7
Hi,
I just ran into the same problem with FCKeditor 2.6 on Drupal 6.2. This was due to the default setting of FCKEditor configuration options. Use these settings in your FCKEditor profile:
FCKConfig.IgnoreEmptyParagraphValue = true ;
FCKConfig.FillEmptyBlocks = false ;
#8
I looked for this setting in drupal 5.7 and did not see it. Is this a drupal 6 thing?
#9
These settings are in fckeditor/fckeditor/fckconfig.js (using 5.x-2.1)
However if I change them as suggested above:
FCKConfig.IgnoreEmptyParagraphValue = true ;
FCKConfig.FillEmptyBlocks = false ;
It still adds an extra <p> however doesn't put inside it. So it just looks like this: <p></p>.
Has anyone found a solution?
#10
subscribing
#11
I've had same problem, after inspection it turned out that problem was in my file-saving code, I can suggest you to do the same thing if nothing else solved your problem.
If you are saving content from fck into file, truncate file (to clear current content) then save content from fck to file. That solved problem for me.
Good luck!
#12
I'm seeing the same thing but not consistently.
#13
subscribing
#14
This is a duplicate of http://drupal.org/node/241271 which seems more authoritative.