2016-11-05 7 views
1

나는 CKeditor를 사용하고있다.ckeditor의 내용을 얻는 방법

$this->load->library('ckeditor');  
    $this->load->library('ckfinder');  
    $this->ckeditor->basePath = base_url().'assets/ckeditor/'; 
     $this->ckeditor->config['toolbar'] = array(
       array('Source', '-', 'Bold', 'Italic', 'Underline', '-','Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','-','NumberedList','BulletedList')    
               ); 
$this->ckeditor->config['language'] = 'en';  
$this->ckeditor->config['width'] = '730px';   
$this->ckeditor->config['height'] = '300px';      
$this->ckfinder->SetupCKEditor($this->ckeditor,'../../assets/ckfinder/');  

방법으로 가능하다 - 내가보기 -

<?php echo $this->ckeditor->editor("textarea name","Enter Post Content"); ?>  

내 컨트롤러 코드에서 ckeditor 텍스트 영역을 표시하는 코드입니다 다음 뒀다
- 나는 jQuery를 사용하여 버튼 클릭에 변수에 콘텐츠를 저장해야 데이터를 변수에 저장 하시겠습니까?
감사합니다.

+1

가능한 중복으로 수행하십시오 http://stackoverflow.com/questions/3799317/how-can -i-get-content-of-ckeditor-using-jquery –

답변

1

그냥 시도 -
예를 -

<?php echo $this->ckeditor->editor("desc","Enter desc Content"); ?> 

버튼 이벤트 - 단지의

var variable-name = CKEDITOR.instances.desc.getData(); 
관련 문제