function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sateesh_sfdc@yahoo.comsateesh_sfdc@yahoo.com 

How to write counter characters on rich text area data type

Here it is a sample code it work only text area data type pls send me solution very urgent

<apex:page >
<script type="text/javascript">
var maxLength=100;
function charLimit(el) {
if (el.value.length > maxLength) return false;
return true;
}
function characterCount(el) {
var charCount = document.getElementById('charCount');
if (el.value.length > maxLength) el.value = el.value.substring(0,maxLength);
if (charCount) charCount.innerHTML = maxLength - el.value.length;
return true;
}
</script>
<apex:form >
<apex:inputtextarea onKeyPress="return charLimit(this)" onKeyUp="return characterCount(this)" rows="8" cols="40" />
</apex:form>
<p><strong><span id="charCount">100</span></strong> more characters available.</p>
</apex:page>