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;
a:hover { color: #3ca9f6 }
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);
}
}
}
Dear all,
Exporting partially-selected annotation ranges (annotation markers around selection or only one annotation marker in the selection) with a DocumentFragment from a RadDocument does not seem possible (the DocumentFragment contains none of these annotation ranges).
For example, if I have a document ("[", "]" are the annotation markers):
"Test [annotated]",
select "Test [ann" and create a DocumentFragment, the Document fragment will contain "Test ann" and not "Test [ann]".
PS.: I am not sure if this falls into the feature request or bug report area.
<!DOCTYPE html>
<html>
<body>
<div><p>RadDocument</p></div>
<div>Document</div>
</body>
</html>
Appling the following command changing the margin but doesn't change the position of the DocumentRuler:
this.radRichTextBox.ActiveDocumentEditor.ChangeSectionPageMargin(new Padding((int)Unit.InchToDip(3.0)));
The result:
MethodInfo method = typeof(RadRichTextBoxRulerController).GetMethod("OnSeparatorsChanged", BindingFlags.NonPublic | BindingFlags.Instance);
method.Invoke(this.ruler.Controller, null);
<telerik:DocumentRuler x:Name="ruler">