Edit Files directly?

5 posts, 0 answers
  1. PapaSmurf
    PapaSmurf avatar
    12 posts
    Member since:
    Apr 2005

    Posted 27 Mar 2008 Link to this post

    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.
  2. Rumen
    Admin
    Rumen avatar
    14031 posts

    Posted 27 Mar 2008 Link to this post

    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
  3. PapaSmurf
    PapaSmurf avatar
    12 posts
    Member since:
    Apr 2005

    Posted 27 Mar 2008 Link to this post

    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,,
  4. Rumen
    Admin
    Rumen avatar
    14031 posts

    Posted 27 Mar 2008 Link to this post

    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
  5. Selçuk
    Selçuk avatar
    5 posts
    Member since:
    May 2011

    Posted 08 Sep 2011 Link to this post

    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;
    }
    
    
Back to Top