[jQuery] SOT: TinyMCE changing my HTML, not being consistent.

[jQuery] SOT: TinyMCE changing my HTML, not being consistent.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=632552713-08082008><FONT face=Arial size=2>I've got a container
element which holds a string of user defined HTML. I'm planning
on swapping the contents in and out using TinyMCE but I'm running into
a problem.<BR></FONT></SPAN></DIV>
<DIV><SPAN class=632552713-08082008><FONT face=Arial size=2><A
href="http://commadelimited.com/code/editinplace/">http://commadelimited.com/code/editinplace/</A></FONT></SPAN></DIV>
<DIV><SPAN class=632552713-08082008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=632552713-08082008><FONT face=Arial size=2>Click the large
chunk of text on the right and you'll get an alert box containing the HTML in
the #couponText element. Then you should see the TinyMCE box. Make any changes
you like (they won't get saved), then click Save. Next you'll get the HTML
string extracted from TinyMCE using the built in API for
TinyMCE:</FONT></SPAN></DIV>
<DIV><SPAN class=632552713-08082008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=632552713-08082008><FONT face=Arial
size=2>tinyMCE.activeEditor.getContent()</FONT></SPAN></DIV>
<DIV><SPAN class=632552713-08082008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=632552713-08082008><FONT face=Arial size=2>Then, another alert
box containing a "cleaned up" string (nothing much there yet). The main problem
is that TinyMCE appears to be adding extra HTML to the string which is really
messing up the text in the container. Even if you don't make ANY changes,
TinyMCE screws with the HTML.</FONT></SPAN></DIV>
<DIV><SPAN class=632552713-08082008><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=632552713-08082008>Does anyone
have any ideas on how I might be able to get around this issue?</SPAN><SPAN
class=632552713-08082008><FONT></DIV></FONT></SPAN></FONT></FONT>
<DIV> </DIV>
<DIV align=left><SPAN style="FONT-SIZE: 14px"><B><FONT face="Century Gothic">
<DIV align=left><SPAN class=159130414-05012007><FONT face=Arial size=2><SPAN
class=159130414-05012007><FONT face=Arial
size=2>____________________________________</FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=159130414-05012007><FONT face=Arial size=2><SPAN
class=159130414-05012007></SPAN></FONT></SPAN> </DIV>Andy
Matthews<BR></FONT></B></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><SPAN
style="FONT-SIZE: 8.5pt; FONT-FAMILY: 'Century Gothic'; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-no-proof: yes">Senior
ColdFusion Developer</SPAN><BR></FONT></SPAN><SPAN style="FONT-SIZE: 11px"><FONT
face="Century Gothic"><FONT color=#808080><SPAN
style="FONT-SIZE: 11px"></SPAN><IMG alt="" hspace=0
src="cid:632552713@08082008-13F6" align=baseline border=0></FONT><BR>Office:
 615.627.9747<BR>Fax:  615.467.6249</FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 11px"><FONT face="Century Gothic"><A
href="http://www.dealerskins.com/">www.dealerskins.com</A></FONT></SPAN></DIV>
<DIV><SPAN style="FONT-SIZE: 11px"></SPAN> </DIV>
<DIV><SPAN style="FONT-SIZE: 11px"><SPAN style="FONT-SIZE: 12px"><FONT
face="Century Gothic">Total customer satisfaction is my number 1 priority! If
you are not completely satisfied with the service I have provided, please let me
know right away so I can correct the problem, or notify my manager <FONT
color=#fe6500>Aaron West</FONT> at <FONT
color=#0000ff><U>awest@dealerskins.com</U></FONT>.</FONT></SPAN></SPAN></DIV>
<DIV> </DIV></BODY></HTML>