Having problems using the JS API to create an instance of FCKeditor and load it with content. The idea is that html content is pulled from a database and loaded into the FCKEditor. I can get the html loaded, but if I output with .Create(), the resulting html that is output overwrites the surrounding page...ie, all I see is the html for the editor (and that's also all I see if I view source -- no head, title, body, tags, etc).
If I output using ReplaceTextarea(), the editor and page look right, but the initial content isn't loaded. Here are screenshots:
http://www.flickr.com/photos/21668224@N00/show/
initialization code for Create() is:
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.Width=615;
oFCKeditor.Height=400;
oFCKeditor.Value = document.forms[0].EwepText.value; //If I just replace this with "Test", same problem.
oFCKeditor.Create();
initialization code for ReplaceTextarea() is:
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
oFCKeditor.Width=615;
oFCKeditor.Height=400;
oFCKeditor.Value = document.forms[0].EwepText.value; //If I just replace this with "Test", same problem.
oFCKeditor.ReplaceTextarea();
I'm guessing this is simple, but I'd appreciate any help. Thanks.
jp
Thu, 09/27/2007 - 01:01
#1
Re: Javasscript API and Create()
jp