Print Page | Close Window

javascript assistance

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=15035
Printed Date: 31 March 2026 at 7:53pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: javascript assistance
Posted By: Lofty
Subject: javascript assistance
Date Posted: 11 May 2005 at 12:43pm

Hello y'all.

I've encountered a problem in a mod i'm making on my site to allow users to paste code into their forum messages using htmlarea and fckeditor.

I have the popup box working and pasting the code into the editor all fine. the issue I'm having is that both htmlarea and fckeditor replace the /n carraiage return  chr(13) with a <br /> tag.

now this is fine.  but as soon as i run the code section through server.htmlencode all the formatting is lost and theres <br /> tags all the way through the displayed code snippet.

so what i'm trying to do is to replace the carriage return with a custom tag.  which I will convert back into the carriage return on the thread view page.

so.. my plea for help.

anyone know a javascript fucntion that can find and replace the carriage return keys from a string?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net