1

Closed

Programmatically fill with a long text ?

description

Problem when I programmatically fill the Editor with a long continuous string (more than 635 chars, pure text, no line-breaks, no or simple markup, no Ms-Word), some blank lines are automatically put in front ("<br />"). The amount of blank lines is 2 for a 640 chars text, but is 10 for a 1500 chars text ! Below +-600 chars, no blank lines are put in front. More strange: <br /> tags inside the text are removed !
When I PASTE a 2000 chars string in the Editor window, there is no problem, the problem appears only when I fill programmatically!
IE8 on W7.
 
Code for testing:
private void FillEditor( string myText)
{
        this.Editor1.Text = myText.Substring(0, 600);
}
Html:
    <cc2:Editor ID="Editor1" runat="server" Height="570px">
    </cc2:Editor>
 
After further testing, the problem occurs likewise in Firefox with a text longer than 4000 characters.

file attachments

Closed Sep 1, 2010 at 9:33 PM by Ale55andro

comments

Ale55andro wrote Aug 27, 2010 at 9:18 PM

It's a client-side bug. The editor looks at the HTML you are passing it from the server and it detects that it's just a bunch of text with no HTML block element to contain it and tries to save the day (except the code had a bug). I have fixed it now. You can download the fixed version on the 28th ( tomorrow ).

Many thanks for reporting,

Alessandro

wrote Sep 1, 2010 at 9:33 PM

wrote Feb 14, 2013 at 3:23 AM

wrote May 16, 2013 at 8:14 AM