Opened 17 years ago
Closed 17 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)
Change History (6)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
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 17 years ago by
Attachment: | textarea.png added |
---|
Changed 17 years ago by
Attachment: | request_parameter.png added |
---|
comment:3 Changed 17 years ago by
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 17 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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.
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 />