I'm using the EditorModule RadEditorStatistics and it always returns one less character than what has actually been entered in the text box. I'm not sure if it's the way I've implemented it or if that is just the way it works. Any help would be appreciated. I'm including the markup and js I use. Any help would be greatly appreciated.
<
telerik:RadEditor
ID
=
"redJustification"
runat
=
"server"
EditModes
=
"Design"
MaxTextLength
=
"4000"
SkinID
=
"DefaultSetOfTools"
ContentAreaMode
=
"Div"
OnClientInit
=
"CharCountInit"
Height
=
"225px"
Width
=
"98%"
Style
=
"background-color: White; overflow: auto; display: block"
Skin
=
"Default"
TabIndex
=
"51"
>
<
Tools
>
<
telerik:EditorToolGroup
>
<
telerik:EditorSeparator
/>
<
telerik:EditorTool
Name
=
"Cut"
/>
<
telerik:EditorTool
Name
=
"Copy"
/>
<
telerik:EditorTool
Name
=
"Paste"
/>
<
telerik:EditorSeparator
/>
<
telerik:EditorTool
Name
=
"SelectAll"
/>
<
telerik:EditorTool
Name
=
"FindAndReplace"
/>
<
telerik:EditorSeparator
/>
<
telerik:EditorTool
Name
=
"AjaxSpellCheck"
/>
<
telerik:EditorSeparator
/>
</
telerik:EditorToolGroup
>
</
Tools
>
<
Modules
>
<
telerik:EditorModule
Name
=
"RadEditorStatistics"
/>
</
Modules
>
</
telerik:RadEditor
>
function
CharCountInit() {
var
originalRender = Telerik.Web.UI.Editor.Modules.RadEditorStatistics.prototype.render;
Telerik.Web.UI.Editor.Modules.RadEditorStatistics.prototype.render =
function
() {
originalRender.apply(
this
);
this
.get_editor().remove_selectionChange(
this
._onDoCountDelegate);
this
.get_editor().attachEventHandler(
"onkeydown"
,
this
._onDoCountDelegate);
};
}