The properties applied locally to the content are not preserved and used for the new content when the user changes the paragraph indent.
Workaround: Keep the properties in a variable and apply them after executing the command:
StyleDefinition style;
private void RadRichTextBox_CommandExecuted(object sender, CommandExecutedEventArgs e)
{
if (e.Command is IncrementParagraphLeftIndentCommand)
{
this.radRichTextBox.CurrentEditingStyle.CopyPropertiesFrom(style);
}
}
private void RadRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{
if (e.Command is IncrementParagraphLeftIndentCommand)
{
style = new StyleDefinition(this.radRichTextBox.CurrentEditingStyle);
}
}
private void RadRichTextBox_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e){ if (e.Command is PasteCommand && this.radRichTextBox.Document.IsEmpty) { this.radRichTextBox.Insert(" "); }}htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Inline;htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Classes;Finding text with regex for the last paragraph is not possible. This is caused by the fact that the search treats the last paragraph symbol as the last paragraph.
If I setup the richtextbox content through the UI as shown in P1.png and try to restore it by pasting the generated html, I get instead P2.png. Expected to be the same.
I attached the sample project. We're using the recommended settings to use the same html in telerik reports, but can't find the reference on your site, it used on the on this link http://docs.telerik.com/devtools/wpf/controls/radrichtextbox/import-export/features-import-export-settings#htmlformatprovider