Hello,
I am using RadEditor and arrange it to save automatically. I just copied Auto save demo example to my project. Actually, it works correctly. But Rad editor lost focus after autosave which is really annoying. Do you have any idea about why I am experiencing such a scenario. I would appreciate it a lot, if you could help me to overcome it.
Thanks in Advance
Kind Regards
AytaƧ Utku TOPAL
Additional Informations:
Here are OnclientLoad function and timer related stuffs (It is almost identical with example given. It just doesn't update UI
I am using RadEditor and arrange it to save automatically. I just copied Auto save demo example to my project. Actually, it works correctly. But Rad editor lost focus after autosave which is really annoying. Do you have any idea about why I am experiencing such a scenario. I would appreciate it a lot, if you could help me to overcome it.
Thanks in Advance
Kind Regards
AytaƧ Utku TOPAL
Additional Informations:
- I am using RadEditor 2009 Q1 version 2009.1.402.20
here are my timer and editor
<asp:UpdatePanel ID="Deneme" runat="server" UpdateMode="Conditional"> | |
<Triggers> | |
<asp:AsyncPostBackTrigger ControlID="TimerAutoSave" EventName="Tick" /> | |
</Triggers> | |
<ContentTemplate> | |
<telerik:RadEditor runat="server" ID="DocEditor" Height="550" Width="100%" OnClientLoad="OnClientLoad"> | |
</telerik:RadEditor> | |
<asp:RequiredFieldValidator ID="EditorValidator" runat="server" ControlToValidate="DocEditor" | |
SetFocusOnError="true" Display="Static"> | |
</asp:RequiredFieldValidator> | |
<asp:HiddenField ID="hdnUserID" runat="server" Value="" /> | |
<asp:HiddenField ID="hdnLanguageCode" runat="server" Value="" /> | |
<asp:HiddenField ID="hdnTempDocID" runat="server" Value="" /> | |
<asp:HiddenField ID="hdnServerName" runat="server" Value="" /> | |
<asp:HiddenField ID="hdnServerPort" runat="server" Value="" /> | |
<asp:HiddenField ID="hdnVirtualDirectoryName" runat="server" Value="" /> | |
<asp:HiddenField ID="hdnPostASPX" runat="server" Value="" /> | |
</ContentTemplate> | |
</asp:UpdatePanel> | |
<asp:Timer ID="TimerAutoSave" runat="server" Interval="120000"> | |
</asp:Timer> |
Here are OnclientLoad function and timer related stuffs (It is almost identical with example given. It just doesn't update UI
<script type="text/javascript"> | |
function OnClientLoad(sender, args) | |
{ | |
var timer = $find("<%=TimerAutoSave.ClientID %>"); | |
startCounter(); | |
sender.add_spellCheckLoaded(function() | |
{ | |
var spell = sender.get_ajaxSpellCheck(); | |
spell.add_spellCheckStart(function(sender, args) | |
{ | |
timer._stopTimer(); | |
//Stop counter | |
stopCounter(); | |
}); | |
spell.add_spellCheckEnd(function(sender, args) | |
{ | |
//Restart the timer; | |
timer._startTimer(); | |
//Restart counter | |
startCounter(); | |
}); | |
} | |
); | |
} | |
var initialSeconds = 120; | |
var currentSeconds = initialSeconds; | |
var interval = null; | |
function startCounter() | |
{ | |
if (!interval) | |
{ | |
currentSeconds = initialSeconds; | |
interval = window.setInterval(function() | |
{ | |
if (currentSeconds > 0) | |
{ | |
currentSeconds--; | |
} | |
else | |
{ | |
currentSeconds = initialSeconds; | |
} | |
}, 1000); | |
} | |
} | |
function stopCounter() | |
{ | |
if (interval) window.clearInterval(interval); | |
interval = null; | |
} | |
</script> |