I am implementing "edit HTML" functionality by creating a RadDocument and loading a HTML file. Once I modify the RadDocument and try to export/save with below code snippet; the newly HTML has improper rendering. By improper rendering, I mean, some additional content gets added than what appears in the RadDocument.
//---------------------------Code snippet of Importing-------------------------------------
document = fromFormatProvider.Import(readStream); ===========> Load the *HTM provider readStream to RadDocument
//-----------------------------------------------------------------------------------------------------
// -----------------------------Code snippet of Exporting-------------------------------------
IDocumentFormatProvider fromFormatProvider = new HtmlFormatProvider();
using (FileStream writeStream = new FileStream(emailtemplateinfo.Path, FileMode.OpenOrCreate))
{
document.EnsureDocumentMeasuredAndArranged();
fromFormatProvider.Export(document, writeStream); ======================> Export the newly modified RadDocument to HTM provider
}