Empty paragrapghs in RichTextBox

2 posts, 0 answers
  1. Nuno Oliveira
    Nuno Oliveira avatar
    10 posts
    Member since:
    Jan 2006

    Posted 23 May 2011 Link to this post

    Hi,

    I have a richtextbox that receives its content from a text data provider.
    The problem is that the lines of text containing only CR+LF (\n), are ignored by the editor.
    In order to make them visible I have to insert a space after de CR+LF.

    Is there a solution for this problem?

    TextDataProvider
    <telerikText:TxtDataProvider x:Key="textDataProvider" x:Name="DocumentProvider" Text="{Binding SelectedEvent.Expression, mode=TwoWay}" RichTextBox="{Binding ElementName=FormulaTextBox}" SetupDocument="TxtDataProvider_SetupDocument"/>

    RichTextBox
    <telerik:RadRichTextBox x:Name="FormulaTextBox" telerik:StyleManager.Theme="Expression_Dark" Margin="0,20,0,0" Background="#FFE9E9E9" IsSpellCheckingEnabled="False" DocumentInheritsDefaultStyleSettings="True" AcceptsReturn="True" AcceptsTab="True" AllowScaling="True" IsReadOnly="{Binding AllowChanges, Converter=StaticResource NotConverter}}" />


    Thanks in advance.

    Nuno
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 26 May 2011 Link to this post

    Hello Nuno Oliveira,

    Thank you for bringing up this issue.
    You have properly described the current behavior - empty paragraphs are not imported in the document. On the other hand, if a paragraph contains an interval, it is no longer considered empty and is visible in the imported document.
    We have revised this behavior and the fix will be available in the next release - the Q2 Beta, which is due in mid-June. The only workaround is the one you have found - adding an interval to every empty paragraph.

    Greetings,
    Iva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top