Hi folks,

I've just added FCKeditor to an existing D5 website and when I activate it, all current nodes lose all their formatting, so breaks and paragraphs all get merged into one.

Luckily I did this on a test version of the site and not the live one! Is there a way to add the editor to a site without screwing up existing content?

Comments

Jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

Do you mean that the HTML output becomes unformated or are <br> and <p> tags removed? As far as I can see, the formatting should be maintained. Could you describe a procedure that leads to this error?

Jorrit’s picture

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

Closed because of lack of response.

ggevalt’s picture

Status: Closed (fixed) » Active
ggevalt’s picture

Version: 5.x-2.2 » 6.x-1.3

I'm hoping that I can revisit this issue, because for me it is huge.

We ran into the same problem with an existing Drupal site.... anytime someone opened up an old node, it automatically zapped the previous html coding and turned the post into one large paragraph. This is totally unsuitable, yet we really want to convert to a rich text editor.

The question is whether there is something that can be done to preserve formatting of existing nodes or translate the inherent code in the plain text versions into something recognized by fckeditor.

Thanks so much.

geoff gevalt

Dubber Dan’s picture

Only just getting round to look at this myself as I've got another site that needs a rich text editor turning on. Will give it another go on a test version of the site and report back fully

Jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry, posted to wrong issue.

Jorrit’s picture

Status: Postponed (maintainer needs more info) » Active
drupalfan2’s picture

This problem still exists for me.
Is there any solution?

On my drupal site there are a lot of node, all created without FCK-Editor, created with drupal standard body field.

Now FCK-Editor shall be actived. If so, and somebody edits a node all formatting gets lost.
Solution?
Thanx.

PetarB’s picture

I ran into this issue. Very, very annoying. Foruntately there was a solution for our installations.
The culprit was the button/plugin BBCode. Where you go to set up the Plugins/Buttons for FCKEditor (through WYSIWYG admin area), be sure to make BBCode is not selected. This created the issue for us, anyway.
Best of luck!

drupalfan2’s picture

What do you mean? How can the problem be solved?

Jorrit’s picture

This issue is currently associated with FCKeditor version 1. Is the problem also present in version 2?

drupalfan2’s picture


YES YES YES!

FCKEditor is totally unusable because of this problem!
PLEASE HELP!

ggevalt’s picture

FCKeditor... request help
Several of us here are looking for assistance in a characteristic of FCKeditor that when it is activated on the site, any node created previously under plain text (core) formatting gets smooshed into one paragraph. This seems to occur only if user goes in and click edit on previously created content.

Work around is to create a new content type and associate FCKeditor only with new content type, but that seems a rather awkward solution.

Is there another way around this problem? Has anyone out there found a solution? We really would appreciate your help.

Thanks in advance

drupalfan2’s picture

This
http://drupal.org/node/513998
can be a solution but as you can read here
http://drupal.org/node/513998#comment-2666390
this solution makes a lot of other problems!

So what can we do?

Jorrit’s picture

So basically what the problem is, is that the following happens:

A node with plain text value

Text line 1

Text line 2

Text line 3

gets converted to

<p>Text line 1 Text line 2 Text line 3</p>

instead of

<p>Text line 1</p>

<p>Text line 2</p>

<p>Text line 3</p>

I can try to make an autoconversion if the module detects that the source doesn't contain any HTML. Usually nodes created with FCKeditor contain at least <p> and </p>, so it should be possible. In any case, the feature will be off by default when I make it for the first couple of weeks.

PetarB’s picture

Well DrupalFan2, I'm not sure if we are talking about the same issue, but I ran into the problem. In the WYSIWYG FCKEditor configuration page, many of the buttons/plugins can be turned on or off. I experienced the issue detailed above until I removed the 'BBCode' button.
I don't know why this fixed the issue for me. Perhaps someone else can shed light on this?

Jorrit’s picture

@PetarB: You are referring to the WYSIWYG module (http://drupal.org/project/wysiwyg). This issue is associated with the FCKeditor module, which is not affiliated with the WYSIWYG module.

drupalfan2’s picture

We still need a solution for this problem! Maybe we can use the line break converter code of filter.module

function _filter_autop($text)

and run this function bevor(!) story node content is loaded into body textfield of edit page (node/xxx/edit).

But how can this be implemented? (maybe a hack, but where can we start, how can we start to realize this?)

PetarB’s picture

Thanks Jorrit, confirmed, and my apologies.

Jorrit’s picture

@DrupalFan2: I already am working on such code, I just wanted to confirm that what I did is okay. So that's why I wrote comment #15. I think I will commit the code this weekend, I will let you know.

drupalfan2’s picture

I have solved the problem by myself:

I used function _filter_autop($text) to run over database fields body and teaser in table node_revisions for story node type (and wrote my specific function to do this).

Cody G’s picture

I thought I had fckeditor and drupal figured out and then I updated to the latest fckeditor. When I attempted an edit of a previously written in fckeditor node, it began stripping tags as described above, including tables, img, br, bold ... well, it stripped everything. It's very frustrating. I'd like to try turning off BBCode, I remember seeing the option when I turned it on, but I can't seem to find that form again. :(

Jorrit’s picture

@Cody G: the issue you describe is not related to this issue. Are you using the WYSIWYG module?

Cody G’s picture

I'm describing how the formatting is being removed. It looks like the same issue. yes ... using fckeditor and there is a wysiwyg module... where I finally found the bbCode under http://cozyhost.ca/admin/settings/wysiwyg/profile
However, bbCode wasn't on. So, now I'm completely confused.

Jorrit’s picture

This issue is about plain text formatting being lost (new lines), not about HTML tags being lost. Secondly, you are using the wysiwyg module, so you should consult http://drupal.org/project/wysiwyg

Jorrit’s picture

Status: Active » Fixed

Fixed in CVS for FCKeditor 6.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.