Hi,
I need a live word count which counts words as you type into an FCKeditor window.
I found the following javascript on HotScripts.com - it really is great and works a treat with normal textboxes, when I add the code to the fckeditor box it does nothing, any suggestions?
Any suggetions welcome, many thanks. M00S3
I need a live word count which counts words as you type into an FCKeditor window.
I found the following javascript on HotScripts.com - it really is great and works a treat with normal textboxes, when I add the code to the fckeditor box it does nothing, any suggestions?
<textarea name="content" onkeyup="wordcount(this.value)"></textarea>
<script language="JavaScript">
var cnt;
function wordcount(count) {
var words = count.split(/\s/);
cnt = words.length;
var ele = document.getElementById('w_count');
ele.value = cnt;
}
document.write("<input type='text' id=w_count size=4 readonly>");
</script>
<!-- Script by hscripts.com -->
Any suggetions welcome, many thanks. M00S3

Re: Great piece of code works with every textbox but a FCKeditor
Re: Great piece of code works with every textbox but a FCKeditor
Re: Great piece of code works with every textbox but a FCKeditor
<textarea name="content" onkeyup="wordcount(nameofmyfckeditortextbox.value)"></textarea>
But, as it doesn't use a textbox, then perhaps I could get it to check the document? I'm not very good with javascript!? Is there a good website with plugins for FCKEditor someone could recommend? Or can I modify the script to check the correct document:
<textarea name="content" onkeyup="wordcount(document.form.fckeditor.value)"></textarea> - - something like that?
Hmm not sure,
thanks for your help
M00s3
Re: Great piece of code works with every textbox but a FCKeditor
https://sourceforge.net/tracker/index.p ... tid=737639
Re: Great piece of code works with every textbox but a FCKeditor