Posted
on Feb 1, 2012
(permalink)
Hi, I have tried this solution and is not working for me.
I have seen that in my case the OnClientLoad="OnClientLoad" is not doing anything, the function is not being triggered.
In my case I have the RadEditor inside of a Telerik:RadTabStrip as follows:
<telerik:RadTabStrip ID="ResourceTabContainer" runat="server" SelectedIndex="0" MultiPageID="RadMultiPage">
<Tabs>
<telerik:RadTab Text="Editor" PageViewID="EditorTab" Value="EditorTab">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage" runat="server" SelectedIndex="0">
<telerik:RadPageView ID="EditorRadPageView" runat="server">
<telerik:RadEditor ID="ResourceValueEditor" runat="server" SkinID="BasicSetOfTools" OnClientLoad="OnClientLoad"
Width="100%" Height="400px" StripFormattingOnPaste="MSWordRemoveAll">
<SpellCheckSettings spellcheckprovider="EditDistanceProvider"></SpellCheckSettings>
</telerik:RadEditor>
</telerik:RadPageView>
</telerik:RadMultiPage>
And my java script function is this:
function OnClientLoad(editor, args) {
alert("OnClientLoad function called");
editor.attachEventHandler("onkeydown", function (e) {
if (e.keyCode == 8 || e.keyCode == 46) {
var oCmd = new Telerik.Web.UI.Editor.GenericCommand("DeleteKey", editor.get_contentWindow(), editor);
editor.executeCommand(oCmd);
}
});
}
But I can't even see the "OnClientLoad function called" message.
Could you please tell me what could be the problem?
Thanks in advance