htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0:
Editing the same text adds <BR>'s


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


ottergoose
Novice

Nov 30, 2004, 5:35 PM

Post #1 of 8 (2282 views)
Shortcut
Editing the same text adds <BR>'s Can't Post

When using htmlArea, if I edit the same block of text more than once, it will add extra line breaks within my text.

For example, I input the following text into htmlArea:
================================
this is the first line

this is the third line
================================

I then save the text, and then edit it again, but, it shows up like this:
================================
this is the first line


this is the third line
================================

After repeatedly saving and reopening the text, I'll end up with something that looks like this:

================================
this is the first line










this is the third line
================================

Every time I edit the text, htmlArea adds an extra <BR> between paragraphs.

Has anyone else seen this? If so, how did you fix it?


wjlilin
New User

Nov 30, 2004, 6:54 PM

Post #2 of 8 (2272 views)
Shortcut
Re: [ottergoose] Editing the same text adds <BR>'s [In reply to] Can't Post

Watch It!


wjlilin
New User

Dec 1, 2004, 2:00 AM

Post #3 of 8 (2258 views)
Shortcut
Re: [wjlilin] Editing the same text adds <BR>'s [In reply to] Can't Post

Press The "shift" and "enter" keys , And Press "delete" key to delete the "space" at the end.


Luis
Veteran

Dec 1, 2004, 11:45 AM

Post #4 of 8 (2251 views)
Shortcut
Re: [wjlilin] Editing the same text adds <BR>'s [In reply to] Can't Post

Hi wjillin:

I'm pretty sure this is not a problem in HTMLArea but in the script that processes the form. If it was originally wrote to process a normal textarea, chances are that it's converting every carriage return into a <BR>

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea


ottergoose
Novice

Dec 1, 2004, 3:16 PM

Post #5 of 8 (2242 views)
Shortcut
Re: [Luis] Editing the same text adds <BR>'s [In reply to] Can't Post

This isn't a carriage return issue.

This input:
=================================
Line 1

Line 3
=================================
Generates the following html, which does not contain carriage returns:

Code
<P><FONT color=#333333 size=2>Line 1</FONT></P><P><FONT color=#333333 size=2>Line 3</FONT></P>


Then, if I open that very same text with htmlArea again, and save it, I get the following html:

Code
<P><FONT color=#333333 size=2>Line 1</FONT></P><BR><P><FONT color=#333333 size=2>Line 3</FONT></P>


If I repeat again, I get this:

Code
<P><FONT color=#333333 size=2>Line 1</FONT></P><BR><BR><P><FONT color=#333333 size=2>Line 3</FONT></P>


So, as you can see, I'm getting an extra <BR> between all of my <P> and </P>'s.

I have written some custom functions that check the length of the HTML, and change the font face and color to our web site's standards, however, I don't believe that these functions are causing the problem. On the other hand, since I wasn't able to find any other posts regarding this problem on these forums, I suspect it is one of my functions. I will install it in another location and see if I'm able to replicate it with a clean install.


Luis
Veteran

Dec 3, 2004, 12:46 AM

Post #6 of 8 (2202 views)
Shortcut
Re: [ottergoose] Editing the same text adds <BR>'s [In reply to] Can't Post

Hi ottergoose:

If you want attach your editor and I'll gladly try to debug it.

greetings


Don't give up!!
http://webstationone.com/test/htmlarea


ottergoose
Novice

Dec 3, 2004, 2:39 PM

Post #7 of 8 (2195 views)
Shortcut
Re: [Luis] Editing the same text adds <BR>'s [In reply to] Can't Post

Alright, I finally got it figured out.

It was a problem on my end, as most problems are.

I had a function that converted the text submitted via the form into a string that was safe to store in a DB - but there was nothing in that function that dealt with new lines. However, right before the text was submitted to the database with another function, there was an extra line of code that modified the string again, adding a <BR> at the carriage return.

Thanks for the help. Luckily it wasn't an htmlArea problem.


Luis
Veteran

Dec 3, 2004, 9:21 PM

Post #8 of 8 (2186 views)
Shortcut
Re: [ottergoose] Editing the same text adds <BR>'s [In reply to] Can't Post

Good it worked. I was sure it was a carrige return issue.

greetings


Don't give up!!
http://webstationone.com/test/htmlarea

 
 
 


Search for (options)