TrackChanges and Comments

3 posts, 0 answers
  1. John
    John avatar
    14 posts
    Member since:
    Oct 2017

    Posted 07 Nov 2018 Link to this post

    I'm looking into replacing our current HTML editor with the Telerik version and the track changes and comments caught my eye.  But we have different user roles, where State users can enter text, images etc in the editor.  We have another group that can read the text but can not make any changes at all.  is it possible for the read-only user be able to see the tracked changes (before being accepted) and the entered comments and still not be able to make any changes?

     

    thanks

     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5922 posts

    Posted 07 Nov 2018 Link to this post

    Hello John,

    The tracked changes and comments in the editor are placed as HTML nodes with corresponding attributes. This means that you can render them on any page and they will be available. You can see how they render in our demos (here and here) and in the Track Changes documentation. When the content is in a RadEditor, it also gives you a popup when you click on content with a comment, that also allows you to edit that comment. Without the editor, this feature is unavailable.

    So, you can easily place a RadEditor on the page in a hidden element so it fetches the coloring styles, or register its stylesheet on your own, and then the plain HTML content. I am attaching two screenshots of how this looks.

    <%--Option 1 - fetch the editor stylesheet Note the Lite suffix - it is appropriate if you are using the Lightweight RenderMode, if you are using the Classic mode, remove he Lite suffix --%>
       <link href='<%= Telerik.Web.SkinRegistrar.GetWebResourceUrl(this, typeof(RadEditor), "Telerik.Web.UI.Skins.EditorLite.css") %>' rel="stylesheet" type="text/css" />
     
    Option 2 - add hidden editor that will fetch the stylesheet too
    <%--<div style="display: none;">
        <telerik:RadEditor runat="server" ID="re1"></telerik:RadEditor>
    </div>--%>

    If you set the Enabled property of an editor to false, it will render as a simple <div> element with the HTML from its content inside. It will not allow editing, will not have a toolbar and will not fetch its styles. So, this is an easy way to reuse the same page and toggle the property depending on the user role.

    Regards,
    Marin

  3. John
    John avatar
    14 posts
    Member since:
    Oct 2017

    Posted 07 Nov 2018 in reply to Marin Bratanov Link to this post

    Hi Marin,

    Thank you for the information, it helps a lot.

Back to Top