I am using IncrementParagraphLeftIndent() to increase the left margin. When I export using the html provider I can see the margin has been set in the Style for that run.
<style type="text/css">
.p_6F87C71A { margin: 0px 0px 0px 28px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; }
</style><p class="p_6F87C71A"><span class="s_6BF1D20F">This text should be indented</span></p>
However, when I import using the html provider the margin setting is lost. When I export again I can see the margin is set to 0.
<style type="text/css">
.p_384D933F { margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; }
</style><p class="p_384D933F"><span class="s_6BF1D20F">This text should be indented</span></p>
Here's the code I'm using for Import/Export:
<style type="text/css">
.p_6F87C71A { margin: 0px 0px 0px 28px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; }
</style><p class="p_6F87C71A"><span class="s_6BF1D20F">This text should be indented</span></p>
However, when I import using the html provider the margin setting is lost. When I export again I can see the margin is set to 0.
<style type="text/css">
.p_384D933F { margin: 0px 0px 0px 0px;text-align: left;text-indent: 0pt;padding: 0px 0px 0px 0px; }
.s_6BF1D20F { font-family: 'Calibri';font-style: normal;font-size: 16px;color: #000000; }
</style><p class="p_384D933F"><span class="s_6BF1D20F">This text should be indented</span></p>
Here's the code I'm using for Import/Export:
private static HtmlFormatProvider _htmlFormatProvider; private static void InitHtmlFormatProvider() { _htmlFormatProvider = new HtmlFormatProvider(); var htmlExportSettings = new HtmlExportSettings(); htmlExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment; _htmlFormatProvider.ExportSettings = htmlExportSettings; } private void commandBarButtonLoad_Click(object sender, EventArgs e) { string text = File.ReadAllText(@"c:\temp\RichText.txt"); RadDocument document = _htmlFormatProvider.Import(text); radRichTextBox1.Document = document; } private void commandBarButtonSave_Click(object sender, EventArgs e) { string html = _htmlFormatProvider.Export(radRichTextBox1.Document); File.WriteAllText(@"c:\temp\RichText.txt", html); }