RadEditor Content Property

3 posts, 1 answers
  1. Adhelp
    Adhelp avatar
    6 posts
    Member since:
    Aug 2012

    Posted 04 Oct 2012 Link to this post

    I have a web site that stores documentation.  We use RadEditor to add and update our documents.  I'm in the process of converting all my pages from .NET 1.1  to .NET 4.0

    As a result I'm using a newer version of RadEditor.

    Our documentation is actually stored as html in a SQL database.

    When we display a document, we read the SQL DB into an XML doc and display it.

    I have RadEditor working just fine to add new documents.  However, I'm having problems with editing documents.

    When I retrieve my data from the SQL database, I'm loading the .InnerXML of my XML doc in the the RadEditor Content field.  RadEditor starts up in Design mode, but the main window is showing all the HTML markup - how can I load my data, so that the main window shows my rendered document, with the HTML markup in the lower window only?

    Basically, I need to make this new version of RadEditor function the way my old RadEditor 7.3.5 did.  I've uploaded some files to illustrate my problem. 
  2. Answer
    Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 09 Oct 2012 Link to this post

    Hi,

    My suggestions is to replace the &lt; and &gt; entities with < and > respectively before you load such tags in RadEditor. Once you do that the tags will be rendered in the content area in Design mode.


    All the best,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Adhelp
    Adhelp avatar
    6 posts
    Member since:
    Aug 2012

    Posted 09 Oct 2012 Link to this post

    Thank you!

    That was a great hint...

    Not being all that experienced with working with xmlDocument classes in VB.NET, my next challenge was how to do as you suggested.

    I did note that in my old code I assigned the RadEditor from my xmlDocument's InnerText field.  My new code, as it was being upgraded to .NET 4.0 could no longer do that - I had to switch over to using XPATHNavigators and it only provided me with an InnerXML field.

    What I finally figured out was to create an XMLDocumentFragment from the section of my XMLDoc that contained the "body" of my document that I needed to load into the editor.

    The XMLDocumentFragment class DOES have an InnetText field, and when I assigned that into the RadEditor Content field, everything displayed as I expected to.

    A learning experience all around!

    Thank you for your help!
Back to Top