Converting HTML to text
Moderator: General Moderators
Converting HTML to text
I'm looking for a class that does this so I can easily make multipart TEXT/HTML e-mails. I haven't had much luck so far finding a PHP class that does this, although there are some windows applications for it. Does anyone happen to know of such a class?
what do you mean converting HTML to TEXT.
you mean you want to convert the HTML entities into text representations?
if so, have a look at htmlentities()
you mean you want to convert the HTML entities into text representations?
if so, have a look at htmlentities()
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
feyd | Please use
more tutorial visit: http://www.website-tutorial.net/
feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
This function can delete all HTML tag
[syntax="javascript"]function CheckForm(form){
form.content.value=IframeID.document.body.innerHTML;
//alert(form.content.value);
var s = form.content.value;
s = s.replace(/(<(.[^>]*)>)|( )/g,"");
s = s.replace(/[\r][\n]/g,"");
//alert("*" + s + "*");
//alert(s.length);
MessageLength=IframeID.document.body.innerHTML.length;
if(MessageLength<2){alert("so short");return false;}
if(MessageLength>50000){alert("so long");return false;}
document.editfrm.submit.disabled = true;
return true;
}
</script>feyd | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]