I have radeditor defined with clientside event
<telerik:RadEditor ID="RadEditor3" Runat="server" EditModes="Design, Preview"
StripFormattingOnPaste="MSWordNoFonts" Width="100%" OnClientLoad="OnClientLoad"
AutoResizeHeight="false" BorderStyle="None" Height="530px" Skin="Office2007" >
Javascript function is
function OnClientLoad(editor) {
editor.attachEventHandler("onkeydown", function(e) {
var content = editor.get_text(); //returns the editor's content as plain text
var words = 0;
if (content) {
var punctRegX = /[!\.?;,:&_\-\-\{\}\[\]\(\)~#'"]/g;
var contentcontent = content.replace(punctRegX, "");
var trimRegX = /(^\s+)|(\s+$)/g;
contentcontent = content.replace(trimRegX, "");
if (content) {
splitRegX = /\s+/;
var array = content.split(splitRegX);
words = array.length;
}
}
// var counter = $get("counter");
// counter.innerHTML = "Words: " + words + " Characters: " + content.length;
var wcountLabel = document.getElementById("<%= lblWordCount.ClientID %>";
var hfwcountId = document.getElementById("<%= hfWordCount.ClientID %>");
wcountLabel.innerText = "Words: " + words;
hfwcountId.innerText = words
});
Please let me know what I am missing here
Thanks