Hi,
I am using RadEditor to display my content from database. On a client side button click event, i should know whether the content in the editor been modified or not. I have used the following code which is working when user tries to add/modify the content using key input. But same was not working when user drags and drops the content in the editor. I have used mousedown event but it is not firing.
I have taken variable"hdnIsContentChange" which is initially set to false, when user tries to modify the data i am comparing the intial content of the editor with new value which i put in hidden variables.
"onkeyup" is the only event is working, the rest are all not working.
var hdnIsContentChange = false;
function Editor_OnClientLoad(Editor, args)
{
Editor.attachEventHandler ("onmouseup", ContentChange); //not working
Editor.attachEventHandler ("onmousedown", ContentChange);//not working
Editor.attachEventHandler ("ondrag", ContentChange);//not working
Editor.attachEventHandler ("onchange", ContentChange);//not working
Editor.attachEventHandler ("onkeyup", ContentChange);//working
function ContentChange()
{
$get("hdnNewContent").value = radEditor.get_html();
if($get("hdnInitialContent").value != $get("hdnNewContent").value)
get("hdnIsContentChange").value = true;
}
}
Please let me whether this approach is correct or already is there any way to know the content been modified by using editor's built-in functions or properties.
I am using RadEditor to display my content from database. On a client side button click event, i should know whether the content in the editor been modified or not. I have used the following code which is working when user tries to add/modify the content using key input. But same was not working when user drags and drops the content in the editor. I have used mousedown event but it is not firing.
I have taken variable"hdnIsContentChange" which is initially set to false, when user tries to modify the data i am comparing the intial content of the editor with new value which i put in hidden variables.
"onkeyup" is the only event is working, the rest are all not working.
var hdnIsContentChange = false;
function Editor_OnClientLoad(Editor, args)
{
Editor.attachEventHandler ("onmouseup", ContentChange); //not working
Editor.attachEventHandler ("onmousedown", ContentChange);//not working
Editor.attachEventHandler ("ondrag", ContentChange);//not working
Editor.attachEventHandler ("onchange", ContentChange);//not working
Editor.attachEventHandler ("onkeyup", ContentChange);//working
function ContentChange()
{
$get("hdnNewContent").value = radEditor.get_html();
if($get("hdnInitialContent").value != $get("hdnNewContent").value)
get("hdnIsContentChange").value = true;
}
}
Please let me whether this approach is correct or already is there any way to know the content been modified by using editor's built-in functions or properties.