HighDots Forums  

FCKEditor event handling

JavaScript discussion (multi-lingual) JavaScript discussion (alt.comp.lang.javascript)


Discuss FCKEditor event handling in the JavaScript discussion (multi-lingual) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
kieran.j.lee@gmail.com
 
Posts: n/a

Default FCKEditor event handling - 07-19-2007 , 02:35 AM






I have several FCKEditor panels on the same ASP.NET 1.1 page. I am
using the onblur and onfocus events of FCKEditor to collapse and
expand the toolbar when the user places the cursor in or out of the
editor panel. This is working great. However, since the toolbar is
expanded, I'd also like to be able to expand the height of the current
FCKEditor panel onfocus and then reduce the height again when leaving
the Editor panel and collapsing the toolbar again. I have tried
several variations of the code below to no avail. Has anybody had a
similar experience and come up with a solution?

<script type="text/javascript">

function FCKeditor_OnComplete( editorInstance )
{
editorInstance.Events.AttachEvent( 'OnBlur' , FCKeditor_OnBlur ) ;
editorInstance.Events.AttachEvent( 'OnFocus', FCKeditor_OnFocus ) ;
}

function FCKeditor_OnBlur( editorInstance )
{
editorInstance.ToolbarSet.Collapse() ;
editorInstance.Height = 200 ;
}

function FCKeditor_OnFocus( editorInstance )
{
var oEditor =
FCKeditorAPI.GetInstance(editorInstance.Name).Edit orWindow.parent ;
oEditor.Height = "1000px" ;
editorInstance.ToolbarSet.Expand() ;
}

</script>


Reply With Quote
  #2  
Old   
jbohn@appiandigital.com
 
Posts: n/a

Default Re: FCKEditor event handling - 08-07-2007 , 09:44 AM






Thanks for your posting. I used your code, with no problem. Have you
tried moving the script to different parts of the page? I have my
javascript after the code that creates the FCKeditor. I would try
simplifying your FCKeditor to basic and just 4 lines of code and go
from there.. Perhaps there is a conflict somewhere.. good luck


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.