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

Comments

joshbotnet’s picture

CORRECT SOURCE CODE:

<div>text here</div>

INCORRECT AFTER SWITCH TO SOURCE VIEW:

<div>text here</div><p>&nbsp;</p>

as above

wwalc’s picture

Status: Active » Postponed (maintainer needs more info)

What browser and which version of FCKeditor (the editor, not the FCKeditor module) are you using?
FCKConfig.EnterMode is set to <p>?

levelos’s picture

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.

bsuttis’s picture

I've got the same problem, each of my FCKeditor textareas outputs an additional <p>&nbsp;</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.

jeffsensat’s picture

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.

jeffsensat’s picture

I upgraded to FCKEditor 2.6 Beta. That fixed the extraneous insertion of &nbsp;, <p></p> and <div></div> code (using Drupal 6.1 and FCKEditor module 6.x-1.1).

mjos’s picture

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 ;

dadderley’s picture

I looked for this setting in drupal 5.7 and did not see it. Is this a drupal 6 thing?

kirill.volkov’s picture

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 &nbsp; inside it. So it just looks like this: <p></p>.

Has anyone found a solution?

SocialNicheGuru’s picture

subscribing

rssole’s picture

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!

okeedoak’s picture

I'm seeing the same thing but not consistently.

Mattias-J’s picture

subscribing

okeedoak’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

This is a duplicate of http://drupal.org/node/241271 which seems more authoritative.

willem willem’s picture

shift+enter is a new line i use it to create spaces better with the editor problems. next line in the code will be

a /b and a /p tag

Jorrit’s picture

I don't understand anything of that comment. Besides that, you're commenting on a old, closed issue. Please open a new issue and describe your problem properly.