Hello,
I am writing a software that uses FCKEditor and I want it to have the following functionality:
When the user focuses an FCKEditor textarea, I want it to resize to a specific height. When the textarea loses the focus, I want its height to shrink to another (smaller) value. Defining the onblur and onfocus events for my textareas-to-be-replaced doesn't (certainly) work since FCKEditor replaces those with IFRAMEs.
Please, if anyone can assist, I'd be really grateful. Thanks a lot in advance.
Best,
Areg
I am writing a software that uses FCKEditor and I want it to have the following functionality:
When the user focuses an FCKEditor textarea, I want it to resize to a specific height. When the textarea loses the focus, I want its height to shrink to another (smaller) value. Defining the onblur and onfocus events for my textareas-to-be-replaced doesn't (certainly) work since FCKEditor replaces those with IFRAMEs.
Please, if anyone can assist, I'd be really grateful. Thanks a lot in advance.
Best,
Areg
Re: FCKEditor Javascript Resize area question
You can read here http://wiki.fckeditor.net/Developer%27s ... script_API about some of the events you can attach to FCK itself. I haven't successfully gotten what you're looking for working, so if you do manage to get it working, please post your code so we can see what you did.
Thanks
Monte
Re: FCKEditor Javascript Resize area question
var o_editor = FCKeditorAPI.GetInstance('FCKeditor1') ;
o_editor.EditorWindow.parent.frameElement.height=700;
IE doesn't like the "EditorWindow.parent" part, so we have to find another way to access it.
-Dan
Re: FCKEditor Javascript Resize area question
-Dan
Re: FCKEditor Javascript Resize area question
I wanted to make my FCKEditor areas shrink and expand upon focus changes. Namely, when a focus would be lost, the area would shrink and expand when getting the focus back.
Here is a small script that works both under Firefox and IE.
Might seem like some sort of a hack, but resize is done almost perfectly. Enjoy.