Text length in FCKeditor

I am using FCKeditor for the first time. I have it set up but am having trouble passing the user-text into my javascript code. I understand I have to use the FCKeditorAPI, and probably need something like this:var oEditor = FCKeditorAPI.GetInstance('InstanceName') ;
but I am not clear on what the InstanceName is nor how to get the length.

Any help is greatly appreciated.
BillthehackAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

enwhyseeCommented:
When you're placing the FCKEditor on a page, you would give it an instance name. This name is what you'd pass to GetInstance. For example:

<script type="text/javascript">
  var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
  oFCKeditor.BasePath = "/FCKeditor/"
  oFCKeditor.Create() ;
</script>

For example, this script creates an FCKeditor with the instance name of "FCKeditor1"

This documentation is pretty helpful with the API:
http://wiki.fckeditor.net/
enwhyseeCommented:
Also,  once you call

var oEditor = FCKeditorAPI.GetInstance('InstanceName') ;

you could say:

var length = oEditor.GetXHTML(true).length;

to get the length of the HTML text...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BillthehackAuthor Commented:
Thanks to both of you. I use Oracle Application Express and I do not compose the code myself to create the FCKeditor item. After viewing the source code of the resulting page, I was able to identify the InstanceName and manipulate it through javascript using the length code supplied. I don't quite understand the significance of the syntax GetXHTML(true) but who cares?!

Bill
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.