Hi All,
I am trying to set the value of the editor with javascript.
my code document.all['<%= this.FCKeditor1.UniqueID %>'].value seems to set it, but it is not visable in the control
I have been looking for the correct approach and have found the doco stating to use
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance( '<%= this.FCKeditor1.UniqueID %>') ;
// Get the editor contents as XHTML.
return oEditor.GetXHTML( true ) ; // "true" means you want it formatted.
But hte FCKEditor is throwing an exception: 'FCKeditorAPI' is undefined on the line var oEditor = FCKeditorAPI.GetInstance( '<%= this.FCKeditor1.UniqueID %>') ;
The fckeditor.js file has been loaded by my document.
Im really not sure where to go from here???
Please help.
I am trying to set the value of the editor with javascript.
my code document.all['<%= this.FCKeditor1.UniqueID %>'].value seems to set it, but it is not visable in the control
I have been looking for the correct approach and have found the doco stating to use
// Get the editor instance that we want to interact with.
var oEditor = FCKeditorAPI.GetInstance( '<%= this.FCKeditor1.UniqueID %>') ;
// Get the editor contents as XHTML.
return oEditor.GetXHTML( true ) ; // "true" means you want it formatted.
But hte FCKEditor is throwing an exception: 'FCKeditorAPI' is undefined on the line var oEditor = FCKeditorAPI.GetInstance( '<%= this.FCKeditor1.UniqueID %>') ;
The fckeditor.js file has been loaded by my document.
Im really not sure where to go from here???
Please help.
Re: .NEt Javascript
But I still have the issue of setting the text with JS
FCKeditorAPI.GetInstance( 'ctl00_ContentPlaceHolder1_FCKeditor1' ) undefined User-defined Type
FCKeditorAPI.GetInstance( FCKeditor1 ) 'FCKeditor1' is undefined Error
FCKeditorAPI.GetInstance( ctl00$ContentPlaceHolder1$FCKeditor1 ) 'ctl00$ContentPlaceHolder1$FCKeditor1' is undefined Error
FCKeditorAPI.GetInstance(ctl00_ContentPlaceHolder1_FCKeditor1 ) 'ctl00_ContentPlaceHolder1_FCKeditor1' is undefined Error
FCKeditorAPI.GetInstance( 'FCKeditor1' ) undefined User-defined Type
FCKeditorAPI.GetInstance('ctl00$ContentPlaceHolder1$FCKeditor1') undefined User-defined Type
PLease help
Re: .NEt Javascript
The issue only arises when the page is redirected back from the login page using Forms security.
If I refresh the page, the instances are available, but on first load, when returning from the login page, it does not see any instances.
Any advise on this???
Re: .NEt Javascript
Whether from the login page or a normal link.
I have to refresh the page to make the instance available to FCKeditorAPI
Really stuck now??