This is a migrated thread and some comments may be shown as answers.

Edit Files directly?

4 Answers 178 Views
Editor
This is a migrated thread and some comments may be shown as answers.
PapaSmurf
Top achievements
Rank 2
PapaSmurf asked on 27 Mar 2008, 03:16 PM
Hi,

i want to use the editor to edit Text or CSS files. But the content always returns
HTML. Is there a way to open and save CSS or text files as they were?

Thanx in advance.

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 27 Mar 2008, 03:22 PM
Hi,

RadEditor is rich text editor for editing and producing pure HTML/XHTML content. RadEditor is not a Visual Studio for WEB and it does not offer the ability to edit directly CSS files out-of-the box.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
PapaSmurf
Top achievements
Rank 2
answered on 27 Mar 2008, 03:55 PM
Thanx for your reply. Maybe i just replace the content by removing all html tags.

using System.Text.RegularExpressions;
public static string RemoveHTML(string in_HTML)   
{     
 return Regex.Replace(lv_HTML, "<(.|\n)*?>", "");   
}

Cheers,,
0
Rumen
Telerik team
answered on 27 Mar 2008, 04:03 PM
Hi,

Yes, this seems a good approach to proceed with your implementation. However, once again please note that it us up to the developer to implement this functionality since the editor does not support it built-in.

Greetings,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Selçuk
Top achievements
Rank 1
answered on 08 Sep 2011, 01:01 PM
Hi BarbaPapa,

It seems a good solution, thank you. It worked for me. But there is a little exception about encoded characters like blank.

You should decode your text if you want to get a clear text.

using System.Text.RegularExpressions;
public static string RemoveHTML(string in_HTML)    
{   
string clearText = Regex.Replace(lv_HTML, "<(.|\n)*?>", "");
clearText = System.Web.HttpUtility.HtmlDecode(clearText)
return clearText;
}

Tags
Editor
Asked by
PapaSmurf
Top achievements
Rank 2
Answers by
Rumen
Telerik team
PapaSmurf
Top achievements
Rank 2
Selçuk
Top achievements
Rank 1
Share this question
or