Ok. Here’s my attempt at an example:
I wrote a few lines of different formatting in a word processor, and the html produced was:
Original HTML:
<style>
...
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
</head>
<body lang=EN-US style='tab-interval:.5in;word-wrap:break-word'>
<!--StartFragment-->
<p class=MsoNormal>Here is some text. Font family = Calibri, size 12pt<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>This text is bold</b>.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><i>This text is italicized</i>.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:18.0pt'>This text is in a larger font
= Calibri, size 18</span>.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:11.0pt;font-family:"Garamond",serif'>And here is some more random
text that is centered = Garamond, size 11. Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.<o:p></o:p></span></p>
<!--EndFragment-->
</body>
</html>
Cooked Discourse Post:
If I paste this html into a discourse post, it looks like this (after it goes through the “cook” process):
Here is some text. Font family = Calibri, size 12pt
This text is bold.
This text is italicized.
This text is in a larger font
= Calibri, size 18.
And here is some more random
text that is centered = Garamond, size 11. Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat.
What I’m Trying to Get Back
It’s fine for Discourse to cook the post and display it like it does. But what I want now is to be able to later take a post and get back the original, underlying HTML. So the data I get back should look like this:
<body lang=EN-US style='tab-interval:.5in;word-wrap:break-word'>
<!--StartFragment-->
<p class=MsoNormal>Here is some text. Font family = Calibri, size 12pt<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>This text is bold</b>.<o:p></o:p></p>
(etc.)
Right now if I plug in the “raw” endpoint like you provided, it does not provide this html. Rather, it just provides the text with, it seems, most formatting and spacing removed.
Is it possible to get the original, underlying html back?