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:
Linebreaks in html code


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.

 


shelo99
New User

Dec 6, 2004, 10:34 PM

Post #1 of 3 (2338 views)
Shortcut
Linebreaks in html code Can't Post

Hi everyone, i have a problem triying to use htmlarea with ASP. I want to add to a database the content of the html area, in pute html. The problem is that inside the html code there are linebreaks. For example:



Quote
<P><FONT face="arial, helvetica, sans-serif">text</FONT>text2</P>
<UL>
<LI></LI></UL>



But i need it to be like this:


Quote


<P><FONT face="arial, helvetica, sans-serif">text</FONT>text2</P><UL><LI></LI></UL>



Is it posible to modify the editor in some way to avoid this? I've tried with htmlenconde and urlencode, but stil the linebreaks wont get codified, so i just get to insert part of the code.

Thanks in advance


jonnyl
Novice

Dec 7, 2004, 6:02 PM

Post #2 of 3 (2303 views)
Shortcut
Re: [shelo99] Linebreaks in html code [In reply to] Can't Post

If I understand you correctly your problem is when loading htmlArea with content from the database. In that case it should be ok even if there are linebreaks. If you really need to remove them try replacing the following.
  • "\n" with "" (nothing)
  • "\r" with ""
  • and a combination of the two, I don't remember if its "\r\n" or "\n\r", with ""


So before the content of the database is loaded in to the textarea it should lack the linebreaks (symbolised by the above break characters).


(This post was edited by jonnyl on Dec 7, 2004, 6:03 PM)


shelo99
New User

Dec 7, 2004, 6:46 PM

Post #3 of 3 (2295 views)
Shortcut
Re: [jonnyl] Linebreaks in html code [In reply to] Can't Post

Thanks for your answer. My problem is actually the oposite, i want to insert in the database the code generated with htmlarea. I solved it using the 3.0 beta release wich seems pretty good.



ThanksWink

 
 
 


Search for (options)