Jesse
|
| Posted: 12/17/2004, 1:18 AM |
|
Hello,
I am using the new FCK editor version 2RC1. For implementing this in my pages I used the code from http://ccs.ath.cx/~ccs/kb.php?category_id=59&language_id=1&event_id=83
wich is as follows:
<script language="javascript" src="../FCKeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var sBasePath = '/FCKeditor/' ;
var oFCKeditor = new FCKeditor( '{article_desc_Name}', '100%', 300, 'Default', false ) ;
oFCKeditor.BasePath = sBasePath ;
//oFCKeditor.Config['SkinPath'] = sBasePath + 'editor/skins/default/' ;
if (!document.all)
oFCKeditor.Config['EnableXHTML'] = false;
oFCKeditor.ReplaceTextarea() ;
}
</script>
This code works fine on all my pages but one. This page has other events on the client side and this causes a problem. The window.onload is called in two different events and only one event works.
The code I put last on the page works so this is a big problem for me. I think the problem is the bind_events() CCS is calling.
Does anyone else have this problem?? Can I replace the window.onload function with something else??
I am using CCS 2.3.2 with PHP.
Any help would be appreciated.
Thanks
|
klwillis
Posts: 428
|
| Posted: 12/17/2004, 9:30 AM |
|
Add the call to bind_events() within your onload function event.
That should do it. 
Quote Jesse:
Hello,
I am using the new FCK editor version 2RC1. For implementing this in my pages I used the code from http://ccs.ath.cx/~ccs/kb.php?category_id=59&language_id=1&event_id=83
wich is as follows:
<script language="javascript" src="../FCKeditor/fckeditor.js"></script>
<script type="text/javascript">
window.onload = function()
{
var sBasePath = '/FCKeditor/' ;
var oFCKeditor = new FCKeditor( '{article_desc_Name}', '100%', 300, 'Default', false ) ;
oFCKeditor.BasePath = sBasePath ;
//oFCKeditor.Config['SkinPath'] = sBasePath + 'editor/skins/default/' ;
if (!document.all)
oFCKeditor.Config['EnableXHTML'] = false;
oFCKeditor.ReplaceTextarea() ;
}
</script>
This code works fine on all my pages but one. This page has other events on the client side and this causes a problem. The window.onload is called in two different events and only one event works.
The code I put last on the page works so this is a big problem for me. I think the problem is the bind_events() CCS is calling.
Does anyone else have this problem?? Can I replace the window.onload function with something else??
I am using CCS 2.3.2 with PHP.
Any help would be appreciated.
Thanks
_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"
Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006 |
jesse
|
| Posted: 12/20/2004, 2:55 AM |
|
Thanks for your suggestion.
I have tried that, but it doesn't work. I have added this line in the header:
<script language="javascript" src="../FCKeditor/fckeditor.js"></script>
Then I made an OnLoad event on the Client side for the form. I put the following code in the event:
var sBasePath = '../FCKeditor2/' ;
var oFCKeditor = new FCKeditor( '{tekst_Name}', '100%', 300, 'Default', false ) ;
oFCKeditor.BasePath = sBasePath ;
//oFCKeditor.Config['SkinPath'] = sBasePath + 'editor/skins/default/' ;
if (!document.all)
oFCKeditor.Config['EnableXHTML'] = false;
oFCKeditor.ReplaceTextarea() ;
I published the page but it didn't show the editor. I checked the code and in the Bind Events it didn't include the OnLoad event anywhere so I added the code to the following
if (document.forms["literatuur_edit"]) check_and_bind('document.forms["literatuur_edit"]','onsubmit',page_literatuur_edit_OnSubmit);
if (document.forms["literatuur_edit"]) check_and_bind('document.forms["literatuur_edit"].LeftButton','onclick',page_literatuur_edit_LeftButton_OnClick);
if (document.forms["literatuur_edit"]) check_and_bind('document.forms["literatuur_edit"].RightButton','onclick',page_literatuur_edit_RightButton_OnClick);
if (document.forms["literatuur_edit"]) check_and_bind('document.forms["literatuur_edit"].Delete','onclick',page_literatuur_edit_Delete_OnClick);
if (document.forms["literatuur_edit"]) check_and_bind('document.forms["literatuur_edit"].Cancel','onclick',page_literatuur_edit_Cancel_OnClick);
if (document.forms["literatuur_edit"]) check_and_bind('document.forms["literatuur_edit"]','onload',page_literatuur_edit_OnLoad);
forms_onload();
It still doesn't load the editor. I read something about putting the code in an .js file and include it on the page but I don't know how to do this.
Any help??
|