Paste some text inside RadRichTextEditor. If the text has more rows than the currently visible area you will see that the control does not scroll down to the caret position.
Workaround:
private void RadRichTextBox_CommandExecuted(object sender, CommandExecutedEventArgs e)
{
if (e.Command is PasteCommand)
{
Application.DoEvents();
bool cursorAtDocEnd = this.radRichTextBox.Document.CaretPosition.IsPositionAtDocumentEnd;
if (cursorAtDocEnd)
{
MoveCaretCommand command = new MoveCaretCommand(this.radRichTextBox.RichTextBoxElement);
command.Execute(MoveCaretDirections.Down);
}
}
}
When caret is just after list bullet/numbering and Backspace is pressed, left indent is cleared. Instead, only the bullet should be deleted, and the indent should be kept as it is set.
When ParagraphProperties dialog is opened while several paragraphs are selected, the values in the dialog correspond to the values of that paragraph, where the cursor was placed before opening the dialog. Then if the dialog is closed with OK button, these values are applied to the other paragraphs as well.
Currently when the text contains consecutive non-space symbols like "~!@#$%^&*()_+=-`[]{};:'"/\|., ", each character is detected as a separate word. Instead, they should be considered one word, including all the subsequent space characters. The following functionalities should respect this grouping: - Caret navigation by words (CTRL + left/right arrow), MoveCaret UI command and the corresponding DocumentPosition methods. - Selecting word by double clicking.
a:hover { color: #3ca9f6 }
Scenario 1:
The <br/> tags after </li> are treated as separate paragraphs and inherit the list styling of the previous paragraphs resulting in duplicate bullets.
Workaround:
var paragraphsToRemove = this.radRichTextBox.Document.EnumerateChildrenOfType<Paragraph>().Where(p => p.IsInList && p.Inlines.First() is Break);
foreach (var p in paragraphsToRemove)
{
p.ListId = -1;
}
this.radRichTextBox.UpdateEditorLayout();
Scenario 2:
The <br/> tags added as the last element of <li> are treated as break elements in the content, causing additional new lines in the document.
Workaround:
var paragraphsWithLineBreak = document.EnumerateChildrenOfType<Paragraph>().Where(p => p.IsInList && p.Inlines.Last() is Break);
foreach (var p in paragraphsWithLineBreak)
{
p.Inlines.Remove(p.Inlines.Last);
}
this.richtextbox.Document = document;
When a list is copied from one document (source) to another document (target) and the target contains custom list with different name, the paste command does not paste the list in the target. Steps to reproduce: 1. Open two instances of RadRichTexbox 2. In the first RRTB create new list style -> List1 and use it to create a list 3. In the second RRTB create a new list style -> List 2 and use it to create a list 4. Copy the list from the second RRTB and try to paste it after the list in the first RRTB Expected: The list is pasted. Actual: The list is not pasted, but the list style is added to the List Library.
When a list associated with list style is copied from a document (source document), and is pasted in another document (target document), and the target document contains list style with the same name, the the list style from source is added to the target, which creates two list styles with the same name in the target document. In the same scenario, MS Word uses the list style from the target, and do not add the list style from the source.
When the paragraph formatting symbol has a formatting, different than the one of the spans in this paragraph, the bullet is not aligned to the baseline of the text
When adding a comment it should be marked as created from the current user. Layer with tool tips should be added to show this information. Also comment balloons should contain it.
The word is temporary marked as correct and when another word is added to the dictionary, the ignored one is highlighted again. As a workaround could be used the Ignore All option.
Currently ignored words are marked only in-memory using internal properties of the document model. Make them persist, similar to what MS Word do. Note: In the DOCX format, the document is marked as "clear" (doesn't contain spell check errors) and all misspelled words are enclosed with an errProof annotation.
I have no idea how to reproduce this, but every so often after a paste operation into a RadRichTextBox, the host thread becomes unresponsive to user input. The message pump is still running but the following unhandled exception gets thrown in a tight infinite loop. The only way to close the window is to right click on the taskbar button.
System.NullReferenceException
Message: Object reference not set to an instance of an object.
Call Stack:
at Telerik.Windows.Documents.Layout.LayoutElement.SetParent(LayoutElement newParent)
at Telerik.Windows.Documents.Layout.LayoutBox.EnsureParent()
at Telerik.Windows.Documents.Layout.LayoutBox.get_Parent()
at Telerik.Windows.Documents.Layout.FormattingSymbolLayoutBox.get_IsEndOfCell()
at Telerik.Windows.Documents.Layout.FormattingSymbolLayoutBox.GetFormattingSymbolVisual()
at Telerik.Windows.Documents.SpanBoxPositionHandler.get_Location()
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.GetViewPointFromDocumentPosition(DocumentPosition position)
at Telerik.Windows.Controls.RichTextBoxUI.PasteOptionsPopup.CalculateLocation()
at Telerik.Windows.Controls.RichTextBoxUI.PasteOptionsPopup.OnOwnerLayoutUpdated(Object sender, EventArgs e)
at System.Windows.ContextLayoutManager.fireLayoutUpdateEvent()
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)