How to reproduce: check the attached video
Add only a RichTextEditorRibbonBar without any other control on the form. If you run the application you will notice that it loads more than one second. We should investigate if it is possible and how to improve the initialization time.
Provide functionality allowing a document to be thumbnailed. The customers should be able to export a document to an image. Workaround: Use attached project.
The issue only reproduces on Windows 10( 1806). Check the attached video showing the result: Workaround: Handle the CommandExecuting event this way private void RadRichTextEditor1_CommandExecuting(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs e) { if (e.Command is ChangeFontFamilyCommand && e.CommandParameter.ToString() == "") { e.Cancel = true; } }
The customers need to convert the position to an integer number representing the offset of the current position from the first position in the document. A method returning the position at a specified offset would be useful as well.
Some voice recognition software (Nuance) is using integer positions as well.
In MS Word, MS RichTextBox and DevExpress RichTextBox, the positions are represented as integer numbers.
Hi Sir,
We updated telerik and facing some issues with that.
in new update with rich text editor has new property called MentionBox settings of that auto added in to designer code.
which creates an error when we run the application.
following line is auto added.
mentionBox1.FocusedItemIndex = -1;
we have to comment every time after doing UI changes. and we need to check every time whether that line is commented or not.
Please Help Us.
Thanks,
Ashish.
The HtmlFormatProvider does not import correctly html content of div tags and css styles.
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: 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.
Drop a RadRichTextEditor and a WinForms button on a form. Set the text of the button to "&Activate" and show a message box in the button click handler. Run the program, and type some text - the button is activated whenever you try to type the letter "a" in the editor. Workarround: Inherit RadRichTextEditor and override IsInputChar method protected override bool IsInputChar(char charCode) { return true; }
To reproduce: 1.Add some text to RadRichTextEditor. 2.Copy an image from a Word document and paste it to the RadRichTextEditor. 3.Export the document content with RtfFormatProvider. When you try to open the exported .rtf file via WordPad, you will notice that the image is not loaded. Please refer to the attached files created by MS Word and RadRichTextEditor.
To reproduce: - Add some full pages to the editor. - Remove all margin from the print settings and document settings. - PrintPreview the document. - Seth the print preview dialog zoom to 100% and compare the documents. - You will notice that the print document's content is smaller.
To reproduce: - Add RichTextEditorRibbonBar to a form and open it upon button click several times. - You will notice that the memory is constantly increasing. Workaround: protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } FieldInfo f1 = this.richTextEditorRibbonBar1.GetType().GetField("tabTableStyle", BindingFlags.NonPublic| BindingFlags.Instance); RichTextEditorRibbonTab tab1 = f1.GetValue(richTextEditorRibbonBar1) as RichTextEditorRibbonTab; tab1.Dispose(); FieldInfo f2 = this.richTextEditorRibbonBar1.GetType().GetField("tabTableLayout", BindingFlags.NonPublic | BindingFlags.Instance); RichTextEditorRibbonTab tab2 = f2.GetValue(richTextEditorRibbonBar1) as RichTextEditorRibbonTab; tab2.Dispose(); FieldInfo f3 = this.richTextEditorRibbonBar1.GetType().GetField("tabHeaderFooter", BindingFlags.NonPublic | BindingFlags.Instance); RichTextEditorRibbonTab tab3 = f3.GetValue(richTextEditorRibbonBar1) as RichTextEditorRibbonTab; tab3.Dispose(); base.Dispose(disposing); }
When the RadRichTExtEditor.Document is rapidly changed not all memory is released Workaround: Point loc = radRichTextEditor1.Location; Size size = radRichTextEditor1.Size; radRichTextEditor1.Dispose(); radRichTextEditor1 = new RadRichTextEditor(); radRichTextEditor1.Location = loc; radRichTextEditor1.Size = size; this.Controls.Add(radRichTextEditor1);
How to reproduce: public partial class Form1 : Form { RadRichTextBox tb1; RadRichTextBox tb2; private bool shouldFocus = false; public Form1() { InitializeComponent(); tb1 = new RadRichTextBox(); this.Controls.Add(tb1); tb2 = new RadRichTextBox(); tb2.Location = new Point(200, 0); this.Controls.Add(tb2); this.Load += Form1_Load; } private void Form1_Load(object sender, EventArgs e) { StyleDefinition style = new StyleDefinition(); tb1.IsReadOnly = true; tb1.Document.Insert("text 1", style); tb2.Document.Insert("text 2", style); tb2.IsReadOnly = true; } private void radButton1_Click(object sender, EventArgs e) { tb1.IsReadOnly = false; tb2.IsReadOnly = false; tb1.Focus(); } } Workaround: public partial class Form1 : Form { RadRichTextBox tb1; RadRichTextBox tb2; private bool shouldFocus = false; public Form1() { InitializeComponent(); tb1 = new RadRichTextBox(); tb1.GotFocus += tb1_GotFocus; tb1.LostFocus += tb1_LostFocus; this.Controls.Add(tb1); tb2 = new RadRichTextBox(); tb2.Location = new Point(200, 0); tb2.GotFocus += tb2_GotFocus; tb2.LostFocus += tb2_LostFocus; this.Controls.Add(tb2); this.Load += Form1_Load; } private void tb2_LostFocus(object sender, EventArgs e) { shouldFocus = false; tb2.IsReadOnly = true; } private void tb2_GotFocus(object sender, EventArgs e) { if (shouldFocus) { tb2.IsReadOnly = false; } } private void tb1_LostFocus(object sender, EventArgs e) { tb1.IsReadOnly = true; } private void tb1_GotFocus(object sender, EventArgs e) { if (shouldFocus) { tb1.IsReadOnly = false; } } private void Form1_Load(object sender, EventArgs e) { StyleDefinition style = new StyleDefinition(); tb1.IsReadOnly = true; tb1.Document.Insert("text 1", style); tb2.Document.Insert("text 2", style); tb2.IsReadOnly = true; } private void radButton1_Click(object sender, EventArgs e) { if (shouldFocus) { tb2.Focus(); } else { shouldFocus = true; tb1.Focus(); } } }
To reproduce: - Add some text so the scrollbars appear. - Scroll up and down with the mouse wheel. - When you scroll to the bottom you will notice that there is extra space after the document end. Workaround: http://www.telerik.com/forums/backspace-key-does-not-properly-invalidate-editor#sP5qkJX4b0S8jwZ3MUGTmQ
To reproduce: Use the following code and then select some text: private void radButton1_Click(object sender, EventArgs e) { TxtFormatProvider txtProvider = new TxtFormatProvider(); RichTextEditor.Document = txtProvider.Import(sampleText); RichTextEditor.Document.LineSpacingType = LineSpacingType.Exact; RichTextEditor.Document.LineSpacing =10; DocumentPosition startPosition = RichTextEditor.Document.CaretPosition; DocumentPosition endPosition = new DocumentPosition(startPosition); startPosition.MoveToStartOfDocumentElement(RichTextEditor.Document); endPosition.MoveToEndOfDocumentElement(RichTextEditor.Document); RichTextEditor.Document.Selection.Clear(); RichTextEditor.Document.Selection.AddSelectionStart(startPosition); RichTextEditor.Document.Selection.AddSelectionEnd(endPosition); RichTextEditor.RichTextBoxElement.ChangeFontFamily(new Telerik.WinControls.RichTextEditor.UI.FontFamily("Segoe UI")); RichTextEditor.RichTextBoxElement.ChangeFontSize(Unit.PointToDip(10)); RichTextEditor.Document.Selection.Clear(); } Workaround: RichTextEditor.Document.LineSpacingType = LineSpacingType.Auto; RichTextEditor.Document.LineSpacing =.5;