Completed
Last Updated: 23 Apr 2014 12:56 by Jesse Dyck
ADMIN
Plamen
Created on: 09 Jan 2013 10:29
Category:
Type: Bug Report
9
Fix. RadRichTextBox - The supported CSS property "margin-right" is not working correctly when exporting to HTML
Steps to reproduce:
1) Create a sample .html: 

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
	.p { 
		margin: 0px 0px 0px 28px;
		} 
</style>
</head>
<body>
	<p>
		<span>This text should be indented</span>
	</p>
</body>
</html>

2) Initialize the HTML provider:

private static void InitHtmlFormatProvider()
        {
            htmlFormatProvider = new HtmlFormatProvider();
            var htmlExportSettings = new HtmlExportSettings();
            htmlExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
            htmlFormatProvider.ExportSettings = htmlExportSettings;
        }

3) Import the sample .html file:

private void importFromFile_Click(object sender, EventArgs e)
        {
            string text = File.ReadAllText(@"C:\Sample1.txt");
            RadDocument document = htmlFormatProvider.Import(text);
            radRichTextBox1.Document = document;
        }

4) Export the imported document to .html file:
private void exportToFile_Click(object sender, EventArgs e)
        {
            string html = htmlFormatProvider.Export(radRichTextBox1.Document);
            File.WriteAllText(@"C:\Sample2.txt", html);
        }

Expected Result: margin: 0px 0px 0px 28px;
Actual Result: margin: 0px 0px 0px 0px;
1 comment
Jesse Dyck
Posted on: 14 Aug 2013 12:14
Hi, I just downloaded the latest RadControls for Windows and I still see this issue. What version will this be fixed in?

Thanks,
- Paul