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

How to check if RadEditor contents have changed in Code Behind.

3 Answers 148 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 13 Dec 2012, 02:00 PM
Hello,

I have an Edit Content Page with a Rad Editor Control, first when the user creates a new content, say a Forum Post the content is Saved into the DataBase but when I reload the contents from the Database and then verify them with the contents of Rad Editor I noticed that even if I didn't make any changes the content is not the same, I was comparing string to string content, (DB vs loaded Editor content from DB)

Is there anyway to check whether the contents of the Rad Editor have changed? I want to do this Server Side (Code Behind), is there a property or a field that checks for that?

Thank you.

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 17 Dec 2012, 04:21 PM
Hi,

The content area of RadEditor is an editable IFRAME element which uses the Rich Text Editing (RTE) engine of the browser. The RTE engine automatically validates the content and changes it in different cases: for example IE converts all tags to uppercase, converts the relative links to absolute, corrects the non properly closed tags, etc. In addition to that RadEditor runs its own built-in content filters in order to make the content XHTML compliant.

You can disable some or all of the RadEditor content filters but you cannot stop the RTE engine of the different browsers to validate and change the content. That is why it is very hard or impossible to implement a reliable validation mechanism, because it is not possible to stop the browsers validation.

Best regards,
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.
0
Eric
Top achievements
Rank 1
answered on 17 Dec 2012, 07:39 PM
Hello Rumen I don't really want to compare the content I just want to check if Something has changed, is it possible to do that in Code Behind? or even client side?
0
Rumen
Telerik team
answered on 19 Dec 2012, 01:00 PM
Hello,

Please, see the following code library on the subject: Detecting Changes to the RadEditor.

Kind regards,
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.
Tags
Editor
Asked by
Eric
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Eric
Top achievements
Rank 1
Share this question
or