Хотите вызвать Javascript в коде FCKeditor - PullRequest
1 голос
/ 16 ноября 2010

Я хочу вызвать функцию onblur в FCKeditors.

Вот мой код.

  <?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() ;
  ?>

Кто-нибудь может мне помочь решить эту проблему?

Спасибозаранее.

кандзи

1 Ответ

0 голосов
/ 16 ноября 2010

Не думаю, что это возможно установить в PHP.Однако вы можете достичь этого, используя Javascript на странице HTML / шаблона.

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