Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Default Margin setting
posted

I am having an issue when I paste HTML to the RichTextEditor. I have overriden my Derfault Paragraph Settings but I still get weird margins on empty <p> tags. I have a table I am pasting from a web page that has some empty columns <td></td> and when that happens it automatically inserts a <p>&nbsp;</p> and it assigns it a margin of 6px? I do not know why. Here are my paragraph settings:

var settings = new Infragistics.Documents.RichText.ParagraphSettings();
settings.Spacing = new Infragistics.Documents.RichText.ParagraphSpacingSettings();
settings.Spacing.LineSpacing = new Infragistics.Documents.RichText.LineSpacing(new Extent(0, ExtentUnitType.LogicalPixels), ExtentRule.Exact);
settings.Spacing.AfterParagraph = new Infragistics.Documents.RichText.ParagraphVerticalSpacing(new Extent(0, ExtentUnitType.LogicalPixels));
settings.Spacing.BeforeParagraph = new Infragistics.Documents.RichText.ParagraphVerticalSpacing(new Extent(0, ExtentUnitType.LogicalPixels));
settings.WordWrap = true;
return settings;

Any advice is appreciated