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

TrackChanges and Comments

2 Answers 7 Views
Editor
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 07 Nov 2018, 04:53 PM

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 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 Nov 2018, 06:06 PM
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

0
John
Top achievements
Rank 1
answered on 07 Nov 2018, 07:21 PM

Hi Marin,

Thank you for the information, it helps a lot.

Tags
Editor
Asked by
John
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
John
Top achievements
Rank 1
Share this question
or