More in this section
Forums / Suggestions / Generic content HTML view

Generic content HTML view

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. License Developer
    License Developer avatar
    31 posts
    18 Jun 2008
    26 Jun 2008
    Link to this post
    I have many content blocks that include both html and javascript.

    It seems like the editor strips out white spaces, crlfs, and tabs. It would be great if when I go into the content html and I format the html so that it's readable if the whitespaces would stay. It would be fantastic if we could have color coding as well.

    If there's a way to turn these features on that I haven't found yet I'd greatly appreciate being told how to but as of now it makes editing html in a content area less usable than just using notepad because the content placeholder strips out all of the formatting that I'm putting into the html.

  2. Rumen
    Rumen avatar
    26 posts
    12 Sep 2017
    30 Jun 2008
    Link to this post
    Hi Brett,

    RadEditor is an HTML editor, but not a plain text editor and it can work only with valid HTML tags.

    For example to insert new line in plain text the "\n" tag is used, but in HTML you should use the break tag - "<br />". In order to achieve the desired behavior all the "\n" from the text have to be replaced with "<br />" tags, but you will also need disable all client-side filters of RadEditor, which take care of the production of XHTML compliant content.

    RadEditor does not offer the requested code colorizing feature out-of-the box and we do not plan to implement such a feature for the upcoming Q2 release of RadControls for ASP.NET AJAX, because our To-Do list is pretty much set and this feature is not requested by many clients. If we receive more requests we will raise the priority of this feature.

    Our suggestion is to implement the requested syntax colorizer by not using RadEditor but with a standard editable DIV element:
    <div contentEditable="true" style="border: solid 1px red;width:300px;height:300px">sample content</div>

    Make sure that the Javascript is working fine there and send us the code. We will make the code to work with RadEditor after that and send it back to you.

    Best regards,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered