Print Page | Close Window

replacing repeated url

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=25201
Printed Date: 28 March 2026 at 9:10pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: replacing repeated url
Posted By: grfxmaster
Subject: replacing repeated url
Date Posted: 22 January 2008 at 9:33pm
I see that the RTE script will remove a duplicate http if it's entered as part of the link address, but it will not do this for other types of links. I want it to do this for FTP addresses as well. Is there an easy way to do this? I couldn't find where http was specifically listed as a replace string.



Replies:
Posted By: Nalfaren
Date Posted: 30 January 2008 at 2:32pm
        if (selectedRange != null && selectedRange != ''){
            //place http infront if not already in selected range
            if (selectedRange.substring(0,4) != 'http'){
                selectedRange = 'http://' + selectedRange
            }

in RTE_javascript.asp in the function FormatText, in the part: (command == 'createLink')
Ill guess its here you should add your code.



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