Hi,
I have an application in which I am using RadRichTextBox,
everything works fine but I am trying to convert the text entered in
this textbox to HTML format. For this I am using HtmlFormatProvider. But
the output is not like I want it to be.
for eg. Suppose I enter text "hello" and convert it, it gives me the following output.
"<!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\">\r\n.s_D8D99854 { font-family:
'Verdana';font-style: Normal; }
\r\n</style></head><body><p ><span
class=\"s_D8D99854\"> hello</span></p></body></html>"
but i dont want all these tags.So i did this below code
HtmlExportSettings exportSettings = new HtmlExportSettings();
exportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
exportSettings.StyleExportMode = StylesExportMode.Inline;
HtmlFormatProvider formatProvider = new HtmlFormatProvider();
formatProvider.ExportSettings = exportSettings;
formatProvider.Export(radRichTextBox.Document);
exportSettings.StyleExportMode = StylesExportMode.Inline;
This i m getting error
Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlExportSettings'
does not contain a definition for 'DocumentExportLevel' and no
extension method 'DocumentExportLevel' accepting a first argument of
type
'Telerik.Windows.Documents.FormatProviders.Html.Export.HtmlExportSettings'
could be found (are you missing a using directive or an assembly
reference?
Can some pls help me....