Skip to main content
Participating Frequently
March 19, 2010
Question

replace question

  • March 19, 2010
  • 1 reply
  • 292 views

Hello,

I have a replace question. I use a text editor and when I insert an image the code is looking like: <img src="/webimages/pic.jpg">. I looking for a replace tag that checks the input of the textarea and replace all <img src="/webimages/....jpg"> to <img src="http://www.domain.com/webimages/...jpg"> when saving the text.

Is that possible?

Thanks.

Samall

    This topic has been closed for replies.

    1 reply

    March 19, 2010

    Should be able to do it like this:

    <cfset myText = '<img src="/webimages/....jpg">' />

    <cfset myText = ReplaceNoCase('myText','<img src="/webimages/','<img src="http://www.domain.com/webimages/','ALL') />

    Review more at http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_m-r_34.html .

    Thanks,

    Kevin