Hello!
I'm trying to convert a little .aspx page to a WPF window.
In the .aspx page I have a simple .NET RadEditor that allows me to edit a small text, adding and removing html tag very easily.
As said, I'd like to reproduce the same behaviuor inside a WPFwindow.
Following the official documentation provided, the best solution I found is a combination of a RadRichTextBox and a RadRichTextBoxUIRibbon.
I've spent many hours trying to get the same result, but I couldn't figure it out.
For example, if I write the word "This is a test" in the RadEditor, then select the whole sentence, and press on the "B" button (B for Bold), the result that I achieve when I read the textbox inside the editor is "<strong>This is a Test</strong>". This is perfect!
But if I try to do the same thing inside the RadRichTextBox, using the "B" Button in the RadRichTextBoxRibbonUI, when I export the content of the Document using the provided HtmlFormatProvider the result I get is very different, as I get something like a whole HTML page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled</title><style type="text/css">
p { margin-top: 0px;margin-bottom: 12px;line-height: 1.15; }
body { font-family: 'Verdana';font-style: Normal;font-weight: normal;font-size: 16px; }
.Normal { telerik-style-type: paragraph;telerik-style-name: Normal;border-collapse: collapse; }
.TableNormal { telerik-style-type: table;telerik-style-name: TableNormal;border-collapse: collapse; }
.s_6C8EFA9D { telerik-style-type: local;font-weight: bold; } </style></head><body><p class="Normal "><span class="s_6C8EFA9D">This is a Test</span></p></body></html>
Am I wrong with the configuration? If any other solution exists, I'll be glad to implement it, even if it means to change the whole page logic.
Thank you!
Damiano