Hello
I am devloping a spell check utility using PHP4.2.2 on Redhat9, Apache & Netscape7.1.
I have devloped it successfully for normal text.
but problem comes when I try to check spellings in html formated text.
heres how it works
I have one php named compose_richtext.php. I have provided a toolbar which I got from
http://www.kevinroth.com/rte/demo.htm. here user can type formated text. Their is in built feature given in that toolbar for spell check but I don't want to use that for some reasons. So I implemnted my own code.
when user clicks on spell check the whole data is passed to next page i.e Spellcheck.php their I am using pspell_check & pspell_suggest for spellchecking.
But the problem is how to distinguish actual text from html tags. I looked in php manual & found
htmlentities
nl2br
htmlspecialchars
but I don' think this will work for me.
I can easily use strip_tags but then I will loose all the tags so how will I place the actual text again in formated form.
I read something like tidy->ishtml is their but that don't works with php4.2.2 also I was unable to find proper documantation of how to use it.
So can u please help me & tell me that how can I seprate normal text from html tags spell check it & then again place it inside html tags.
Amit