Search code examples
phpfckeditor

Want to Call Javascript in FCKeditor code


I want to call onblur function in FCKeditors.

Here is the my code.

  <?php
  $oFCKeditor = new FCKeditor('conf_emailtext['.$this->escape($data->conf_id).']') ;  
  $oFCKeditor->BasePath = $this->baseUrl().'/FCKeditor/' ;
  $oFCKeditor->Value =  $this->arrMailList[$i]['conf_emailtext'];
  $oFCKeditor->Height ='400px';
  $oFCKeditor->Width ='650px';
  $oFCKeditor->Create() ;
  ?>

Can anybody help me to sort out this problem?

Thanks in advance.

Kanji


Solution

  • Don't think so, it's possible to set in PHP. However you can achieve this using Javascript on HTML/template page.

    <script type="text/javascript" language="javascript">
    function FCKeditor_OnComplete( editor_instance)
    {
       editor_instance.Events.AttachEvent( 'OnFocus', DoSomething ) ;
       editor_instance.Events.AttachEvent( 'OnBlur', DoSomething1 ) ;
    }
    </script>