I want to get the text the user has entered into the FCK editor before he clicks submit. I make the user click a button (not submit). However, in the button code when I tried referencing to oFCKeditor.Value, I found that it is an empty string. What can I do to see the value? Please help.
Fri, 05/13/2005 - 21:26
#1
RE: Getting value from FCK editor for Javascr
<button OnClick="alert((document.getElementById('FCKeditor1___Frame').contentWindow.document.getElementById('eEditorArea')).contentWindow.document.body.innerHTML);">Test</button>
Obviously you will have to use what's in the alert( ... ) to actually retrieve the content.
Be aware that if you didn't define your editor like this:
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
then you will have to change FCKeditor1___Frame accordingly.
Hope this help!
RE: Getting value from FCK editor for Javascr
should work for you (tho I am a bit jet lagged at the moment so could have got it wrong)
as long as oFCKeditor is an instance of your editor this code will work
RE: Getting value from FCK editor for Javascript