Welcome Guest, Not a member yet? Register   Sign In
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


Messages In This Thread
Ckeditor and html tags like P - by pikamo - 07-26-2017, 03:33 AM
RE: Ckeditor and html tags like P - by InsiteFX - 07-26-2017, 06:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB