I used this to add text to RichTextBox programmatically.
public static void AddText(this ParagraphAdv paragraph, string text)
{
for (int i = 0; i < text.Length; i++)
paragraph.Inlines.Add(new SpanAdv { Text = text[i].ToString() });
}
I pressed Ctrl + Z to undo, but failed.