I already answered your support ticket on the same subject. For convenience I will paste my answer here as well:
I will try to explain in more detail how the Track Changes
dialog and its API works, so that you can implement your scenario:
- editor.set_intitialContent() - marks the current editor content as the "start" content to be used in the dialog:
//Sets editor's current content as initial
<telerik:radeditor id="RadEditor1" runat="server"></telerik:radeditor>
<asp:button id="Button" cssclass="button" runat="server" onclientclick="setContent" text="Set editor's current content as initial" />
If you hit the submit button it will fire the setContent function, which will execute the set_intitialContent() method and set the initial content. After that, edit the content and press the Track Changes tool button. The dialog will be loaded, and will show the differences between the initially set content by the set_intitialContent() method and the content placed in the content area.
- editor.get_initialContent() - returns the content which is set as initial.
- editor.get_html(true) - returns the content in the content area of RadEditor
- editor.set_html(content) - set the supplied by the content argument content in the editor
You can test and see how the dialog works in the following example: Dialogs
Here is a sample scenario how you can proceed:
- load some content in the editor from your Database
- Set the content in the editor using the editor.set_html(contentFromDb) method
- Set the loaded content as initial using editor.set_initialContent()
- Edit content
- Compare the initial and the lastly created / edited content by opening the Track Changes dialog
- If you like the lastly edited content then obtain it using editor.get_html() method and save it in your DataBase.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items