This is a migrated thread and some comments may be shown as answers.

Empty paragrapghs in RichTextBox

1 Answer 67 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Nuno Oliveira
Top achievements
Rank 1
Nuno Oliveira asked on 23 May 2011, 05:04 PM
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

1 Answer, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 26 May 2011, 02:39 PM
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
Tags
RichTextBox
Asked by
Nuno Oliveira
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Share this question
or