Unplanned
Last Updated: 30 Jul 2020 04:33 by ADMIN
When the rtf document contains a table as the one below and the empty declaration is used in the following structure, the document cannot be imported:

{\fonttbl
{\f0 Verdana;}
{\f1 Times New Roman;}
{\f2 ;}
{\f3 Segoe UI;}}
Unplanned
Last Updated: 21 May 2018 13:09 by ADMIN
Unplanned
Last Updated: 23 May 2018 14:35 by ADMIN
Applying negative LeftIndent or FirstLineIndent of a paragraph in web layout mode will visualize the paragraph to the left of RadRichTextBox boundaries.
Unplanned
Last Updated: 23 May 2018 14:28 by ADMIN
Unplanned
Last Updated: 23 May 2018 14:59 by ADMIN
When there is a hyperlink enclosed in another annotation (e.g comment, bookmark, read-only range), and the user moves the caret position just before or just after the hyperlink, and starts typing there, the text is inserted with the style of the hyperlink (by default, blue with blue underline). Instead, the text should be inserted without such style.
Unplanned
Last Updated: 22 May 2018 09:49 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: RichTextEditor
Type: Bug Report
1
To reproduce: run the project, load the document available in the project's folder and start clicking the words. You will notice that the cursor is shifted on the right. 

Workaround: don't enable the RightToLeft property.
Unplanned
Last Updated: 17 Apr 2018 09:19 by ADMIN
When CJK text (Chinese, Korean, Japanes) is copied from WordPad and paste into RadRichTextBox text, the characters are imported incorrectly (as '?' and as different characters). The same applies if WordPad document containing CJK is imported from RTF. 

The problem is related to the specified \fcharset134 RTF tag, which is not properly interpreted.
Unplanned
Last Updated: 16 Apr 2018 13:11 by zhijun
Unplanned
Last Updated: 01 May 2018 10:45 by ADMIN
How to reproduce: create a table with 1px of the inner borders and 3px of the outer borders. The attached screenshots demonstrates the issue. A similar result can be also observed with other widths as well.
Unplanned
Last Updated: 12 Mar 2018 15:51 by ADMIN
ADMIN
Created by: Dess | Tech Support Engineer, Principal
Comments: 0
Category: RichTextEditor
Type: Bug Report
2
When you have more than one RadRichTextEditor controls on the form and you have selected text in both of theme, only the focused RadRichTextEditor should show the selection. 
Unplanned
Last Updated: 21 Jun 2018 14:39 by ADMIN
To reproduce: 
- Load a right to left document with Hebrew characters.
- Export it to PDF
- The characters' position is not correct.

Unplanned
Last Updated: 06 Mar 2018 15:05 by ADMIN
Workaround: 
private void RadRichTextEditor1_CommandExecuting(object sender, CommandExecutingEventArgs e)
{
    if (!(e.Command is PasteCommand))
    {
        return;
    }

    DocumentFragment res = ClipboardEx.GetDocumentFromClipboard("RadDocumentGUID");
    if (res == null)
    {
        foreach (ClipboardHandler settings in ClipboardEx.ClipboardHandlers)
        {
            res = ClipboardEx.GetDocumentFromClipboard(settings.ClipboardDataFormat, settings.ClipboardStringFilter);
        }
    }

    if (res == null)
    {
        e.Cancel = true;
        System.Drawing.Image bitmapSource = Clipboard.GetImage();
        if (bitmapSource == null)
        {
            return;
        }

        Telerik.WinForms.Documents.Layout.Padding sectionmargin = this.radRichTextEditor1.Document.CaretPosition.GetCurrentSectionBox().AssociatedSection.ActualPageMargin;

        double originalPixelWidth = bitmapSource.Width;
        double originalPixelHeight = bitmapSource.Height;

        if (originalPixelWidth == 0 || originalPixelHeight == 0)
        {
            originalPixelWidth = 10;
            originalPixelHeight = 10;
        }

        double width = originalPixelWidth;
        double height = originalPixelHeight;
        
        if (this.radRichTextEditor1.Document.LayoutMode == DocumentLayoutMode.Paged)
        {
            Section currentSection = this.radRichTextEditor1.Document.CaretPosition.GetCurrentSectionBox().AssociatedSection;
            Telerik.WinForms.Documents.Model.SizeF pageSize = (Telerik.WinForms.Documents.Model.SizeF)currentSection.GetType().GetProperty("ActualPageSize", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue(currentSection);

            double maxWidth = pageSize.Width - (sectionmargin.Left + sectionmargin.Right);
            double maxHeight = pageSize.Height - (sectionmargin.Top + sectionmargin.Bottom);
            width = Math.Min(maxWidth, width);
            height = Math.Min(maxHeight, height);
        }
        
        double ratio = originalPixelWidth / originalPixelHeight;
        width = Math.Min(width, height * ratio);
        height = width / ratio;
        
        Telerik.WinControls.RichTextEditor.UI.Size size = new Telerik.WinControls.RichTextEditor.UI.Size(width, height);
        ImageInline imageInline = new ImageInline(new WriteableBitmap(bitmapSource));
        imageInline.Size = size;
        
        this.radRichTextEditor1.RichTextBoxElement.ActiveDocumentEditor.InsertInline(imageInline);
    }
}
Unplanned
Last Updated: 21 Feb 2018 13:30 by ADMIN
Pressing Tab/Shift+Tab when caret position is at the beginning of a paragraph should change current paragraph FirstLineIndent instead of LeftIndent.

First line indent should be changed to Document.DefaultTabWidth step.

Workaround:
private void RadRichTextEditor1_KeyDown(object sender, KeyEventArgs e)
{
    if (e.KeyData != Keys.Tab)
    {
        return;
    }

    this.radRichTextEditor1.Insert("\t");
    e.SuppressKeyPress = true;
    e.Handled = true;
}
Unplanned
Last Updated: 15 Feb 2018 09:27 by ADMIN
Unplanned
Last Updated: 20 Dec 2017 09:42 by ADMIN
There is an issue with the way the editor decides what width to render a table.

The example I have encountered is in an HTML email from Outlook that contained a table. Whatever way Outlook composes the HTML, it adds a width attribute and a style attribute to the table's opening tag:

<table width="0" style="width: 500px;">

In this situation, the inline style should take precedence over the width attribute (the width attribute is actually deprecated as of HTML5). This is how all common browsers behave.

You can see in the attached 1_browser.png that Chrome correctly renders the table at 500px;

However the RadRichtextEditor component incorrectly renders the table at width 0 as shown in attached 2_RadRichtextEditor.png, ignoring the width specified in the style attribute.

Curiously, other CSS rules in the style attribute are correctly interpreted.
For example:

<table width="0" style="width: 500px;font-weight:bold;">

will display a table of zero width with bold text in the RadRichTextEditor.

Thanks guys!
Unplanned
Last Updated: 04 Dec 2017 13:16 by ADMIN
Workaround: To clear a given property, basing on some logic which determines if it should be cleared. For example
this.radRichTextEditor1.CommandExecuting += (s, e) =>
{
    if (e.Command is ChangeStyleNameCommand)
    {
        var style = this.radRichTextEditor1.Document.StyleRepository.GetValueOrNull(e.CommandParameter.ToString());
        if (style.Type == Telerik.WinForms.Documents.Model.Styles.StyleType.Paragraph)
        {
            Paragraph paragraph = this.radRichTextEditor1.Document.CaretPosition.GetCurrentParagraphBox().AssociatedParagraph;
            foreach (Span span in paragraph.EnumerateChildrenOfType<Span>())
            {
                span.ClearValue(Span.FontFamilyProperty);
                span.ClearValue(Span.FontSizeProperty);
            }
        }
    }
};
Unplanned
Last Updated: 21 Nov 2017 11:40 by ADMIN
Unplanned
Last Updated: 20 Nov 2017 12:09 by ADMIN
1. Create a document containing a style with NextStyleName:

           StyleDefinition myStyle = new StyleDefinition();
            myStyle.Type = StyleType.Table;
            myStyle.DisplayName = "My Style";
            myStyle.Name = "myStyle";
            myStyle.NextStyleName = RadDocumentDefaultStyles.HyperlinkStyleName;

            this.radRichTextBox.Document.StyleRepository.Add(myStyle);

2. Add several paragraphs and select some of them (ensure there is one using our custom style).

3. Create a DocumentFragment using the selection's CopySelectedDocumentElements

4. Convert the fragment to RadDocument and try to export it

Observed: When exporting to DOCX and XAML, the style is missing. Exporting to RTF causes KeyNotFoundException.

Expected: The style should be preserved in the exported document

Workaround: After creating the document from the fragment, ensure all needed styles are copied and available.