danthewxman's picture
Joined: 02/06/2004
Posts: 1
A way to count characters?
Is there a way to count the characters in the text input area when using the embedded object? It's trivial to do when using the <textarea> element, but not so much so when using the editor object.

Does anyone have any thoughts? (btw, I'm new to the FCKeditor)
jonnymccullagh's picture
Joined: 30/06/2004
Posts: 9
RE: A way to count characters?
I would be interested in this functionality too. I notice that along with the IFRAME that the FCKeditor creates there is also a hidden field created with the same name and value. I presume the IFRAME updates the hidden field when changes are made.
Would it then be possible to to count characters of the hidden field value? My only problem with this is where I would attach the event. Usually I would have an onChange event attached to the form field, but if the form fields are not creaetd until runtime I am not sure where to add the event.
These are my thoughts!
nathfy's picture
Joined: 09/06/2004
Posts: 3
RE: A way to count characters?
the hidden form variable isn't updated until the form that the editor is in is submitted....

You could count the characters on submit of the form.
harlequin666's picture
Joined: 10/06/2004
Posts: 2
RE: A way to count characters?
You can do something custom for IE, since IE has an onkeypress(or onkeydown?)...type in a character, count the length of the editor and toss it into a textbox. Should update everytime you press a key. But probably wouldn't update if you highlight text and delete with your mouse.