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:
How do I strip certain tags


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.

 


julian_brunt
Novice

Nov 22, 2004, 5:30 AM

Post #1 of 5 (2203 views)
Shortcut
How do I strip certain tags Can't Post

How do I strip certain tags.....

I want to remove the font and font size tags before I post to the database.. how do I do this?


stretch100
New User

Nov 23, 2004, 9:14 AM

Post #2 of 5 (2161 views)
Shortcut
Re: [julian_brunt] How do I strip certain tags [In reply to] Can't Post

If using ASP or similar try running the textarea string through the 'REPLACE' function and replace instances of <TAG> with desired characters or "".

This should be done anyway to remove possible database sql injects etc through the use of ' etc.

Regards

GS


julian_brunt
Novice

Nov 23, 2004, 12:03 PM

Post #3 of 5 (2151 views)
Shortcut
Re: [stretch100] How do I strip certain tags [In reply to] Can't Post

Is this not possible using the js file?

Sorry to sound like a dummy, but I am somewhat low skilled using Dreamweaver for most of my web page work


stretch100
New User

Nov 23, 2004, 3:16 PM

Post #4 of 5 (2148 views)
Shortcut
Re: [julian_brunt] How do I strip certain tags [In reply to] Can't Post

Julian,

I'm not really a JS man however I think the code you need is something like this:



<script type="text/javascript">

var str = new String("Hello World")

document.write(str+"<br/>")

var regEx = new RegExp ('World', 'gi') ;

str = str.replace(regEx, 'User')

document.write(str)

</script>


Output


Hello World

Hello User




This URL is a also a good example for stripping out/replacing characters:

http://developer.irt.org/script/242.htm


You might have to replace the 'onclick' with 'onblur' etc, but it should give you something to play with?

Regards,

GS


julian_brunt
Novice

Nov 25, 2004, 1:35 AM

Post #5 of 5 (2084 views)
Shortcut
Re: [stretch100] How do I strip certain tags [In reply to] Can't Post

OK Where can I edit the editor.js file to perform this function?

 
 
 


Search for (options)