• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ckeditor and html tags like P

#1
Hi,
 I 'm working with Ckeditor. When i submit the post Data , i can't see the html tags like <p> ...
in the view :
PHP Code:
<?php  echo $this->ckeditor->editor("editor1","Default textarea value");?>

in the controller:
Code:
public function create() {
        $this->load->helper('form');
        $this->load->library('form_validation');
        $this->load->library('ckeditor');
        $data['title'] = lang('news_create_title');
        $this->ckeditor->basePath = base_url().'asset/ckeditor/';
        $this->ckeditor->config['toolbar'] = array(
                array( 'Source', '-', 'Bold', 'Italic', 'Underline', '-','Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','-','NumberedList','BulletedList' )
                                                    );
        $this->ckeditor->config['language'] = 'fr';
        if ($this->form_validation->run() === FALSE) {
            $this->load->view('templates/header', $data);
            $this->load->view('menu/index', $data);
            $this->load->view('news/create', $data);
            $this->load->view('templates/footer');
        } else {
            //$new_id = $this->news_model->setNews();
            print_r($this->input->post('editor1'));
              $this->session->set_flashdata('msg', lang('news_create_flash_msg_success'));
            
            /* if (isset($_GET['source'])) {
                redirect($_GET['source']);
               } else {
                redirect('news');
               } */
        }
}
Reply

#2
SEE: PHP NET - htmlentities and html_entity_decode
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.