Forums
This topic is locked
Getting pure text from PD Online HTML Editor
Posted 24 May 2002 22:14:25
1
has voted
24 May 2002 22:14:25 Germán Iurato posted:
Hi!I'm creating an application to update my site's database, and I use the PD HTML Editor to edit each article and save it to the tables.
Now, I'd like to implement a search feature along the articles, and I need to keep a copy of the articles not in HTML code, but in pure text. This will be the field where SQL will search.
That's the question: Is there any property/method declared in the PD HTML Editor to get the pure text, so I assign it to a textarea? How can I get the text without HTML tags?
Thanks!
Replies
Replied 27 May 2002 14:02:52
27 May 2002 14:02:52 Germán Iurato replied:
Please, can anybody help me?
Replied 27 May 2002 19:59:37
27 May 2002 19:59:37 David Behan replied:
Just playing with an idea here for you. I am not sure how viable it is though. It might start you off - but I haven't thought through it enough but it could work...
On submit split the value in the editor into two variables - html and puretext for example. Both have the same information in each.
Then use the replace function to replace anything that starts with < and ends with > including everything in between.
puretext = Replace(puretext,"<" & * & ">",""
Maybe the code above is out a bit but it might work for you. Basically what I am saying there is replace everything that starts with < and all the text after it until you reach >. Replace this with "" nothing.
Regards,
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2
On submit split the value in the editor into two variables - html and puretext for example. Both have the same information in each.
Then use the replace function to replace anything that starts with < and ends with > including everything in between.
puretext = Replace(puretext,"<" & * & ">",""
Maybe the code above is out a bit but it might work for you. Basically what I am saying there is replace everything that starts with < and all the text after it until you reach >. Replace this with "" nothing.
Regards,
_________________________
David Behan - www.site-manager.com/af.asp?a=11&l=1tds9p6x2