Hello,
I am using fckEditor version 2.3.1 I have an html page which creates the fckeditor using jscript (i.e. I am not using an aspx page or the likes).
How can I create the fckEditor so that it has the FitWindow option enabled by default so that the user does not have to click it each time?
I have tried this from Y.Chaouche and it did not work - mainly because I did not have a plugins/FitWindow subdirectory.
"Goto your plugins folder, or where the Fitwindow plugin is installed, it is FCKEditor/editor/plugins/FitWindow by default. Then look for the file fckplugin.js. Add this line to the very bottom of that file :
//First time execution
FCKCommands.GetCommand('FitWindow').Execute();"
Thanks very much!
I am using fckEditor version 2.3.1 I have an html page which creates the fckeditor using jscript (i.e. I am not using an aspx page or the likes).
How can I create the fckEditor so that it has the FitWindow option enabled by default so that the user does not have to click it each time?
I have tried this from Y.Chaouche and it did not work - mainly because I did not have a plugins/FitWindow subdirectory.
"Goto your plugins folder, or where the Fitwindow plugin is installed, it is FCKEditor/editor/plugins/FitWindow by default. Then look for the file fckplugin.js. Add this line to the very bottom of that file :
//First time execution
FCKCommands.GetCommand('FitWindow').Execute();"
Thanks very much!

RE: FitWindow Enabled By Default
I'm the creator of the FitWindow plugin and have got this question a lot. A never could come up with a solution, so I was glad to see that Y.Chaouche had this solution. The reason it doesn't work for you is that you are using FCKeditor version 2.3.1. This version adopted the plugin into its core, so it's no longer a plugin. I searched again how to trigger a command (toolbar function) through javascript, a problem I have tried to solve quite often. I finally found a solution:
Put the code below somewhere in the page that creates the FCKeditor
<script type="text/javascript">
function FCKeditor_OnComplete( editorInstance )
{
FCKeditorAPI.GetInstance('FCKeditor1').Commands.GetCommand('FitWindow').Execute();
}
</script>
With 'FCKeditor1' replaced by the instanceName you chose for you editor.
RE: FitWindow Enabled By Default
Thank you so much for both, creating the plugin and helping me out!
Zoltan.
RE: FitWindow Enabled By Default
I do not want the user to be able to adjust this state, I need it to be enabled at all times. So I thought it would be easy enough to just remove the button from the toolbar, but this is throwing an error:
this.UIButton.State is null or not an object.
Anyone have a fix for this? I can simply hide the error, but I'd rather fix it if its easy enough to do.
Thanks!
RE: FitWindow Enabled By Default
https://sourceforge.net/forum/forum.php ... id=1598024
https://sourceforge.net/forum/message.p ... id=3877940
RE: FitWindow Enabled By Default
Error: this._UIButton has no properties
Source File: /FCK/editor/js/fckeditorcode_gecko.js
Line: 60
Similar error in IE7, I'm certain its due to my ommision of the button in the toolbar but I would rather this operate in the background (maybe its just not possible with the plugin being integrated in FCK).
The error also causes other problems, so I guess I need to fix it afterall:
Error: E has no properties
Source File: /FCK/editor/js/fckeditorcode_gecko.js
Line: 28
RE: FitWindow Enabled By Default
Leave it there, but add the javascript code to diable it.
RE: FitWindow Enabled By Default
That it's so much easier and it will perform much better as the editor doesn't have to load and then resize itself.