To reproduce: - Create new application with a richtextbox in it. - Build it and merge the assemblies. - Start the application type some text then select a part of it and try to do something else. - Note that this occur only the first time when the application is started.
1) Launch the RadRichTextEditor 2) enter some text (at least three lines) 3) select the whole content and apply bullets/ numbers 5) Since the whole content is already selected, open the font color dialog box and try to apply a color (say red color) 6) Notice for the last item in the list , the selected color is not applied to the bullets/ numbers as shown in the attached figs
To reproduce: - Import an html text snippet several times (the text should exceed one page) - Select the entire text and bold it. - Now make the text Italic - You will notice that the text is not bold anymore.
To reproduce:
Open TelerikEditor and underline the whole text. Go to the end of a line and hold space. You will notice that the empty spaces are being underlined. The behavior is not the same as in Word.
Workaround:
Remove the underlining of the empty spaces at the end of the lines:
void Button_Click(object sender, EventArgs e)
{
var caret = this.richTextBox.Document.CaretPosition;
var originalPosition = new DocumentPosition(caret);
caret.MoveToFirstPositionInDocument();
do
{
caret.MoveToCurrentLineEnd();
var endPos = new DocumentPosition(caret);
caret.MoveToCurrentWordStart();
caret.MoveToCurrentWordEnd();
var startPos = new DocumentPosition(caret);
this.richTextBox.Document.Selection.AddSelectionStart(startPos);
this.richTextBox.Document.Selection.AddSelectionEnd(endPos);
this.richTextBox.ChangeUnderlineDecoration(UnderlineType.None);
this.richTextBox.Document.Selection.Clear();
caret.MoveToCurrentLineEnd();
}
while (caret.MoveToNext());
caret.MoveToPosition(originalPosition);
}
Beware that this workaround will not work in all cases. It should be used only prior to exporting or similar cases
To reproduce: string text = "<p style=\"font-family:Calibri; font-size:15pt;\">Hi,<br/><br/><br/><br/>Regards<br/></p>"; HtmlFormatProvider provider = new HtmlFormatProvider(); RadDocument document = new RadDocument(); document = provider.Import(text); radRichTextBox1.Document = document; Click on an empty line and you will see that the font is different.
RadRichTextBox large txt documents (20000 rows)are loaded very slowly.
The HtmlFormatProvider does not import correctly html content of div tags and css styles.
Import the following code: <ol> <li>Coffee</li> <li></li> <li>Milk</li> </ol
Workaround:
public class MyInputBehavior : InputBehavior
{
public MyInputBehavior(DocumentView view)
: base(view)
{
}
public override bool ProcessKeyPress(System.Windows.Forms.KeyPressEventArgs e)
{
// TO DO: You code here
e.KeyChar = char.ToUpper(e.KeyChar);
return true;
// By commenting the base call you are supresing the default logic
//return base.ProcessKeyPress(e);
}
}
Then you should replace the default input behavior by using the following code snippet:
this.richTextBox.DocumentView.InputBehavior = new MyInputBehavior(this.richTextBox.DocumentView);
To reproduce:
1 Please change the font via selection list first.
2 Set text cursor to font input field and select the whole text (if not already done).
3 Press backspace or delete key.
4 An error message appears.
Workaround:
protected override void DropDownListFont_SelectedIndexChanged(object sender, PositionChangedEventArgs e)
{
var ddl = sender as RadDropDownListElement;
if (ddl.SelectedItem != null)
{
base.DropDownListFont_SelectedIndexChanged(sender, e);
}
}
If you import a rtf document, it produces a span instances with highlight color property set to ARGB(255,0,0,0).
Workaround:
foreach (Span span in document.EnumerateChildrenOfType<Span>())
{
if (span.HighlightColor == Color.FromArgb(255, 0, 0, 0))
{
span.HighlightColor = Color.Transparent;
}
}
When importing HTML files if the font from the style contains serif element the font does not get interpreted correctly. For example "font-family: 'Times New Roman','serif';" - this will not work, but this font-family: 'Times New Roman';" will work.
To reproduce: - Import the following string using the HtmlFormatProvider: "<html><head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n </head>\r\n <body text=\"#000000\" bgcolor=\"#FFFFFF\">\r\n Hej\r\n\r\n <title>Sv: Tekniska </title>\r\n \r\n\r\n <br>\r\n <pre>-- \r\nMvh Anders\r\n<a class=\"moz-txt-link-abbreviated\" href=\"http://www.abc.se\">www.abc.se</a></pre>\r\n </body>\r\n</html>" Workaround: - Put a space or between the </a> and </pre> tags.
To reproduce: - Add some text and change its forecolor. - Add more text and change its highlighting - Save as rtf and open it in WordPad.
To reproduce:
- Open a document that contains symbols with the 2015 Q3 SP1 version.
- Export the document using the docx format.
- Open it again.
Workaround:
private void radRichTextEditor1_DocumentChanged(object sender, EventArgs e)
{
this.SelectAllMatches("ï‚°");
this.radRichTextEditor1.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Symbol"));
this.SelectAllMatches("ï‚£");
this.radRichTextEditor1.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Symbol"));
}
private void SelectAllMatches(string toSearch)
{
this.radRichTextEditor1.Document.Selection.Clear();
DocumentTextSearch search = new DocumentTextSearch(this.radRichTextEditor1.Document);
foreach (var textRange in search.FindAll(toSearch))
{
this.radRichTextEditor1.Document.Selection.AddSelectionStart(textRange.StartPosition);
this.radRichTextEditor1.Document.Selection.AddSelectionEnd(textRange.EndPosition);
}
}
Workaround: use different instances of RibbonUI
To reproduce: 1. Install a font that is not part of the default ones. 2. Enter some text in RadRichTextEditor and use the installed font. 3. Export to pdf. 4. Uninstall the font. 5. Try to open the exported pdf. You will notice that the font is not embedded into the file and can not render the text correctly. Please refer to the attached sample pdf file with custom font.
Note: it should be closed automatically when all words are corrected.
To reproduce:
1. Enter some misspelled words and open the context menu with right mouse click.
2. Show the SpellCheckingDialog.
3. Add a word to the dictionary. The SpellCheckingDialog will be closed immediately. However, if you press to ignore the word/words, the dialog remains opened.
Workaround: cancel the SpellCheckingDialog.FormClosing event except when the close button is clicked:
public Form1()
{
InitializeComponent();
this.radRichTextEditor1.IsSpellCheckingEnabled = true;
RadButton buttonClose = ((SpellCheckingDialog)this.radRichTextEditor1.RichTextBoxElement.SpellCheckingDialog).Controls["buttonClose"] as RadButton;
buttonClose.MouseDown += buttonClose_MouseDown;
((SpellCheckingDialog)this.radRichTextEditor1.RichTextBoxElement.SpellCheckingDialog).FormClosing += SpellCheckingDialog_FormClosing;
}
bool shouldClose = false;
private void buttonClose_MouseDown(object sender, MouseEventArgs e)
{
shouldClose = true;
}
private void SpellCheckingDialog_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason != CloseReason.FormOwnerClosing)
{
e.Cancel = !shouldClose;
shouldClose = false;
}
}