Opened 11 years ago

Closed 11 years ago

#1950 closed Bug (invalid)

Line breaks from regular text area

Reported by: Marco Aurélio Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.3.2
Keywords: Cc:

Description

Hi all. I'm new to FCKeditor, so I ask for your patience, please. Here's the deal: our website has an area for consumers to send their complaints about companies. On the site, the forma for writing the complaint is a regular textarea. So the readers enter their text with line breaks (ENTER). But when I open then on the content manager side with FCKeditor, it kills the line breaks, and the entire text appears as one single paragraph. So I have to edit one by one, inserting the proper breaks. It happens with IE and Firefox.

Is there a way to make FCKeditor recognize those line breaks from a normal text area (considering that the text is stored on a MS-SQL database table)?

Thanks a lot.

Attachments (2)

textarea.png (24.8 KB) - added by Michael Osipov 11 years ago.
request_parameter.png (79.4 KB) - added by Michael Osipov 11 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by Michael Osipov

Are you refering to \n?

I did not try myself how a server receives such input but any whitespace is collapsed to a single space \u0020.

You probably have to replace \n with <br />

comment:2 Changed 11 years ago by Marco Aurélio

Thanks for the quick response, mosipov, but I'm kind of confused now. Where should I do the replacement? On FCKeditor, on my code (ASP), on the database?

Changed 11 years ago by Michael Osipov

Attachment: textarea.png added

Changed 11 years ago by Michael Osipov

Attachment: request_parameter.png added

comment:3 Changed 11 years ago by Michael Osipov

See in textarea.png, this something you have with line breaks. See request_paramter.png, this how the serves gets re requests. Line breaks are \r\n on windows, \n on unix.

if you want to be this HTML-appropriate repace the \r\n with <br /> This has to happen before the code is inserted into the editor. In other words, the code which receives the paramter should do that.

comment:4 Changed 11 years ago by Martin Kou

Resolution: invalid
Status: newclosed

Hi Marco,

The time and place at which you should do the conversion depend on your application (e.g. do you expect the customer complaints to be editable under FCKeditor only?), and so we cannot give you a definite answer to that. But anyway, as mosipov has already answered you, ANSI whitespaces like tab and linebreaks are not rendered as-is under most HTML elements (with the exception of <PRE>), and so you'll need to do some conversion between plain text and FCKeditor's (X)HTML input/output.

Another thing of note is that 2.3.2 is a rather old FCKeditor version, you might want to try a newer version in your website (e.g. 2.5.1).

Since this is not an FCKeditor bug, I'm closing this ticket. If you still want to discuss this matter, please go to our forum at http://www.fckeditor.net/forums/viewforum.php?f=1.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy