In this feature, the existing text is overridden as the user types on it with the "Insert" key is pressed on the keyboard.
Workaround: Track the state of the Insert key and delete before inserting content using the KeyDown and CommandExecuting events:
private void MainDemoControl_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.KeyboardDevice.IsKeyToggled(Key.Insert))
{
this.isInsertKeyPressed = true;
}
else
{
this.isInsertKeyPressed = false;
}
}
private void radRichTextBox_CommandExecuting(object sender, CommandExecutingEventArgs e)
{
if (e.Command is InsertTextCommand && this.isInsertKeyPressed)
{
this.radRichTextBox.Delete(false);
}
}
When the MEF catalog of RadRichTextBox is predefined, the PasteOptionsPopup is not automatically loaded and causes NullReferenceException in the presenter when the users press Ctrl or Esc.
Workaround: Add typeof(PasteOptionsPopup) to the catalog.
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
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.
Left indent and hanging indent of paragraph in a list are changed when the document is exported to HTML and then imported. Steps to reproduce: - Add text. - Apply list over the text. - Export the document to HTML - Import the exported HTML Expected: The paragraph in the list preserves its left indent (18 px) and hanging indent (18 px). Actual: The paragraph in the list is with left indent 18 px and hanging indent 0 px.
htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Classes;
htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Inline;
When HTML is imported it may contain invalid images. In such case show the alternative text if there is such text.
The CSS styling for the "p" selector is not imported as a "NormalWeb" style. For example the following: <style type="text/css">p {margin-top:0; margin-bottom:0;}</style> should be imported as SpacingBefore and SpacingAfter set to 0 in Normal (Web) style.
The default styles are not copied when using the CreateDocumentFromSelection method.
Workaround: Manually copy the styles:
var document = radRichTextBox.Document.Selection.CreateDocumentFromSelection();
document.StyleRepository.Clear();
foreach (var item in radRichTextBox.Document.StyleRepository)
{
var style = new StyleDefinition(item);
document.StyleRepository.Add(style);
}