Hi Pragya,
Quoted from the HTML samples provided with FCKeditor:
[START OF CODE]
function getLength(){
// This functions shows that you can interact directly with the editor area
// DOM. In this way you have the freedom to do anything you want with it.
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
// Get the Editor Area DOM (Document object).
var oDOM = oEditor.EditorDocument ;
var iLength ;
// The are two diffent ways to get the text (without HTML markups).
// It is browser specific.
if ( document.all ) // If Internet Explorer.
{
iLength = oDOM.body.innerText.length ;
}
else // If Gecko.
{
var r = oDOM.createRange() ;
r.selectNodeContents( oDOM.body ) ;
iLength = r.toString().length ;
}
alert( 'Actual text length (without HTML markups): ' + iLength + '
characters' ) ;
}
[END OF CODE]
So this is the code you will need to find out the length of the text.
As for doing it as the result of user interaction ie. to update it as
the user types, I couldn't find anything useful on the SourceForge
forums for FCKeditor, but there must be some way...can anyone else
help? We need some kind of 'onChange' handler.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/Javascript/message.cfm/messageid:3125
Subscription: http://www.houseoffusion.com/groups/Javascript/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.33