I am doing an export of already imported html in radrichtextbox.
I am using it as such:
but it doesn't export my html that i imported in first place e.g.
if i import
I get below html back, when exporting:
<style type="text/css">
p { margin-top: 0px;margin-bottom: 12px;line-height: 1.15; }
body { font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px; }
.p_6AAD5060 { margin-top: 0px;margin-bottom: 12px;line-height: 1.15; }
.s_A058BA7C { font-family: 'Times New Roman';font-style: Normal;font-weight: normal;font-size: 50px; }
</style><p class="p_6AAD5060"><span class="s_A058BA7C">test</span></p>
I am using it as such:
HtmlFormatProvider htmlFormatProvider = DocumentFormatProvidersManager.GetProviderByExtension("html") as HtmlFormatProvider; HtmlExportSettings htmlExportSettings = new HtmlExportSettings(); htmlExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment; htmlExportSettings.StyleRepositoryExportMode = StyleRepositoryExportMode.DontExportStyles; htmlFormatProvider.ExportSettings = htmlExportSettings; string html = _htmlFormatProvider.Export(editor.Document);
but it doesn't export my html that i imported in first place e.g.
if i import
<html><head><style>.test{ font-size:50px; }</style></head><body><div class=\"test\"><div style=\"left: 0px; top: 0px; position: absolute;\"> test</div></div></body></html>
I get below html back, when exporting:
<style type="text/css">
p { margin-top: 0px;margin-bottom: 12px;line-height: 1.15; }
body { font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px; }
.p_6AAD5060 { margin-top: 0px;margin-bottom: 12px;line-height: 1.15; }
.s_A058BA7C { font-family: 'Times New Roman';font-style: Normal;font-weight: normal;font-size: 50px; }
</style><p class="p_6AAD5060"><span class="s_A058BA7C">test</span></p>