2016-06-30 6 views
0

私のプロジェクトにckエディタを統合しようとしました。しかし、それはいくつかのエラーマッサージを示しています。 これらのエラーは設定できません。 コントローラのパブリック関数のCKEditorバージョン()ボーンファイアフレームワークのCkeditorヘルパーエラー

$this->load->helper('ckeditor_helper'); 
//print_r($this->load->helper('ckeditor_helper')); 

    //Ckeditor's configuration 
    $data['ckeditor'] = array(

     //ID of the textarea that will be replaced 
     'id' => 'content', 
     'path' => './assets/js/ckeditor', 

     //Optionnal values 
     'config' => array(
      'toolbar' => "Full",  //Using the Full toolbar 
      'width'  => "550px", //Setting a custom width 
      'height' => '100px', //Setting a custom height 

     ), 

     //Replacing styles from the "Styles tool" 
     'styles' => array(

      //Creating a new style named "style 1" 
      'style 1' => array (
       'name'  => 'Blue Title', 
       'element' => 'h2', 
       'styles' => array(
        'color'  => 'Blue', 
        'font-weight' => 'bold' 
       ) 
      ), 

      //Creating a new style named "style 2" 
      'style 2' => array (
       'name' => 'Red Title', 
       'element' => 'h2', 
       'styles' => array(
        'color'   => 'Red', 
        'font-weight'  => 'bold', 
        'text-decoration' => 'underline' 
       ) 
      )    
     ) 

    ); 

    $data['ckeditor_2'] = array(

     //ID of the textarea that will be replaced 
     'id' => 'content_2', 
     'path' => './assets/js/ckeditor', 

     //Optionnal values 
     'config' => array(
      'width'  => "550px", //Setting a custom width 
      'height' => '100px', //Setting a custom height 
      'toolbar' => array( //Setting a custom toolbar 
       array('Bold', 'Italic'), 
       array('Underline', 'Strike', 'FontSize'), 
       array('Smiley'), 
       '/' 
      ) 
     ), 

     //Replacing styles from the "Styles tool" 
     'styles' => array(

      //Creating a new style named "style 1" 
      'style 3' => array (
       'name'  => 'Green Title', 
       'element' => 'h3', 
       'styles' => array(
        'color'  => 'Green', 
        'font-weight' => 'bold' 
       ) 
      ) 

     ) 
    );  
    // Template::set('toolbar_title', 'Create New Event'); 
    Template::set_view('sport_events/ckeditor'); 
    Template::set('ckeditor',$data); 
    Template::render(); 

} 

ビューckeditor.php(これは私のビューpage.justである私はckeditor.jsを呼び出し、ビューにコントローラ機能の配列を渡す)

<script type="text/javascript" src="/asset/ckeditor/ckeditor.js"></script> 
<script type="text/javascript" src="/asset/ckfinder/ckfinder.js"></script> 

<?php 
echo '<pre>'; 
print_r($ckeditor); 
echo '</pre>'; 
    ?>  
<textarea name="content" id="contents" ><p>Example data</p></textarea> 
<?php echo display_ckeditor($ckeditor); ?> 
<textarea name="content_2" id="content_2" ><p>Example data</p></textarea> 
<?php echo display_ckeditor($ckeditor_2); ?> 

enter image description here

答えて

0

エラーは、正しい場所をckeditorフォルダにロードしなかったことです。 パスはパブリックフォルダである必要があります