I'm using the CreateHTML() method to initialize an FCKeditor. I want to set the content of the editor but when I use the FCKeditorAPI.GetInstance('instanceName') i get an error saying "FCKeditorAPI is not defined". I guess it's because the FCKeditor hasn't finnished loading? Any fix or workaround?
fckTest.SetHTML(originalContent) gives an error as well. "SetHTML is not a function" or something like that.
fckTest.SetHTML(originalContent) gives an error as well. "SetHTML is not a function" or something like that.
var fckTest = new FCKeditor('test_edit'); fckTest.BasePath = "fckeditor/"; var originalContent = document.getElementById('myDiv').innerHTML; document.getElementById('myDiv').innerHTML = fckTest.CreateHtml(); var myEditor = FCKeditorAPI.GetInstance('test_edit'); myEditor.SetHTML(originalContent );
Re: SetHTML when using the CreateHTML integration method
Anyone?
Re: SetHTML when using the CreateHTML integration method
Check the sample files.
Re: SetHTML when using the CreateHTML integration method
So there s a way to detect that the editor is loaded? And I could set up a while-loop or something?
Re: SetHTML when using the CreateHTML integration method
Use the FCKeditor_OnComplete() hook:
http://docs.fckeditor.net/FCKeditor_2.x ... Script_API
Re: SetHTML when using the CreateHTML integration method
Can't figure out how to make use of that feature.
I've put together an example of my problem, which can be found here: [link removed]
Notice the error when you press "open editor". I want the original content to be inserted into the editor. It's similar to the ReplaceTextarea-method, but I can't use a textarea in this case because the ReplaceTextarea-method can't find the textarea when it's in another frame.
index.html
iframeContent.html
Re: SetHTML when using the CreateHTML integration method
straight from sample01.html
Re: SetHTML when using the CreateHTML integration method
Thanks a lot!
I couldn't find the value-property listed anywhere in the documentation.
To bad the documentation is incomplete