To reproduce: - Create a document that contains a numbered list (set different font size for the list). - Export it to html and import it back. - You will notice that the numbers are larger the the other text.
To reproduce: use the following code snippet. The attached screenshot illustrates the missing border. Note: It seems that the RadRichTextEditor remains in Portrait orientation although the RadPrintDocument.DefaultPageSettings.Landscape property is set to true. This issue can be replicated if you specify the PreferredWidth property in pixels in such a way that the table fits in A4 format (wider side). The A4 size print measures 21.0 x 29.7cm. private void Form1_Load(object sender, EventArgs e) { RadDocument document = new RadDocument(); document.LayoutMode = Telerik.WinForms.Documents.Model.DocumentLayoutMode.Paged; Section sec = new Section(); sec.PageOrientation = PageOrientation.Landscape; sec.PageSize = PaperTypeConverter.ToSize(PaperTypes.A4); document.Sections.Add(sec); Paragraph para = new Paragraph(); Table table = new Table(); Border b = new Border(Telerik.WinForms.Documents.Model.BorderStyle.Single, System.Drawing.Color.Black); TableBorders tb = new TableBorders(b); table.Borders = tb; sec.Blocks.Add(table); //first row TableRow tableRow = new TableRow(); table.AddRow(tableRow); //cell 0,0 TableCell cell = new TableCell(); cell.PreferredWidth = new TableWidthUnit(TableWidthUnitType.Percent ,20); tableRow.Cells.Add(cell); cell.Blocks.Add(para); Span span = new Span("Cell 0,0"); para.Inlines.Add(span); //cell 0,1 cell = new TableCell(); cell.PreferredWidth = new TableWidthUnit(TableWidthUnitType.Percent ,80); tableRow.Cells.Add(cell); //second row tableRow = new TableRow(); table.AddRow(tableRow); //cell 1,0 cell = new TableCell(); cell.PreferredWidth = new TableWidthUnit(TableWidthUnitType.Percent ,20); tableRow.Cells.Add(cell); para = new Paragraph(); cell.Blocks.Add(para); span = new Span("Cell 1,0"); para.Inlines.Add(span); //cell 1,1 cell = new TableCell(); cell.PreferredWidth = new TableWidthUnit(TableWidthUnitType.Percent ,80); tableRow.Cells.Add(cell); radRichTextEditor1.Document = document; Telerik.WinControls.UI.RadPrintDocument printDocument = new Telerik.WinControls.UI.RadPrintDocument(); printDocument.AssociatedObject = this.radRichTextEditor1; printDocument.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0); printDocument.DefaultPageSettings.Landscape = true; System.Drawing.Printing.PaperSize paperSize = new System.Drawing.Printing.PaperSize(); paperSize.RawKind = 9; printDocument.DefaultPageSettings.PaperSize = paperSize; this.radRichTextEditor1.Print(true, printDocument); }
To reproduce: - Add RadRichTextEditor and RichTextEditorRibbonBar to a form. - Start the application and add some text. - Change the font size with the ribbon bar. - Select the text and open the mini toolbar.
To reproduce Write a word in an RightToLeft language and then type "." You will notice that the dot is moved to the end of the word.
The LocalizeStrings method of the FloatingBlockPropertiesDialog refers to the "Documents_FindReplaceDialog_ReplaceWith" string. This should be "Documents_FloatingBlockPropertiesDialog_TextWrapping" Workaround: public Form1() { InitializeComponent(); FieldInfo fi = this.radRichTextEditor1.RichTextBoxElement.FloatingBlockPropertiesDialog.GetType().GetField("radPageViewPage2", BindingFlags.NonPublic | BindingFlags.Instance); RadPageViewPage textWrappingPage = (RadPageViewPage)fi.GetValue(this.radRichTextEditor1.RichTextBoxElement.FloatingBlockPropertiesDialog); textWrappingPage.Text = "TextWrapping"; }
Workaround: explicitly set the font size of the spans in the heading paragraphs foreach (Section section in this.radRichTextEditor1.Document.Sections) { foreach (Block block in section.Blocks) { Paragraph p = block as Paragraph; if (p != null && p.StyleName == "Heading1") { foreach (var item in p.Inlines) { Span s = item as Span; if (s!= null) { s.FontSize = p.FontSize; } } } } }
To reproduce: - Add RichTextEditorRuler and RichTextEditor to a form. - Add some tab stops in the ruler and press the tab key. Workaround: void radRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (e.Command is IncrementParagraphLeftIndentCommand) { e.Cancel = true; TabForwardCommand tabForward = new TabForwardCommand(this.radRichTextEditor1.RichTextBoxElement); tabForward.Execute(); } }
Copy the following image from the browser and paste it to RadRichTextEditor: https://en.wikipedia.org/wiki/File:Telerik_Logo.png. IOException is thrown when pasting the image. However, it is loaded at the end. Export the image with the following code: private void radButton1_Click(object sender, EventArgs e) { DocumentFormatProviderBase provider = new XamlFormatProvider(); byte[] byteData = provider.Export(this.radRichTextEditor1.Document); } ArgumentException occurs. Workaround: save the image first and copy it from Paint for example.
Would it be possible to make the Font Section dropdown editable on the RabRibbonBar? i.e. It would be nice to be able to enter the character "s" for example and see all fonts starting with S. Currently you must scroll. Thanks, Ronny
To reproduce: - Add RichTextEditorRibbonBar and associate it with RadRichTextEditor at design time. - Show the form and then force the garbage collector. Workaround: - Associate the controls in the load event. - Set the AssociatedRichTextEditor to null just before the form is closed. protected override void OnLoad(EventArgs e) { base.OnLoad(e); richTextEditorRibbonBar1.AssociatedRichTextEditor = radRichTextEditor1; } protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { richTextEditorRibbonBar1.AssociatedRichTextEditor = null; base.OnClosing(e); }
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; } }
Workaround: private void CopyButton_Click(object sender, EventArgs e) { this.radRichTextEditor1.Document.EnsureDocumentMeasuredAndArranged(); if (this.radRichTextEditor1.Document.Selection.IsEmpty) { return; } string selectedText = this.radRichTextEditor1.Document.Selection.GetSelectedText(); DocumentFragment fragmentToCopy = this.radRichTextEditor1.Document.Selection.CopySelectedDocumentElements(true); DataObject dataObject = new DataObject(); if (selectedText != "") { ClipboardEx.SetText(null, selectedText, dataObject); } ClipboardEx.SetDocument(fragmentToCopy, dataObject); ClipboardEx.SetDataObject(dataObject); }
Workaround: use different instances of RibbonUI
To reproduce: - Add some text and change its forecolor. - Add more text and change its highlighting - Save as rtf and open it in WordPad.