CKEditor in CodeIgniter

后端 未结 7 812
别那么骄傲
别那么骄傲 2020-12-29 14:56

I wanna load CKEditor in CodeIgniter,I search a lot,but can\'t understand their way.

I placed ckeditor in application/plugins folder and now I wanna

相关标签:
7条回答
  • 2020-12-29 15:47

    You could otherwise do this:

    1. copy the CKEditor files to a folder in your source's root eg ckeditor
    2. Include the CKEditor files in your view file

       <script src="<?php echo base_url(); ?>ckeditor/ckeditor.js"></script>
              <link rel="stylesheet" href="<?php base_url(); ?>style/format.css">
      
    3. finally your textarea in your html document

       <textarea cols="80" id="edi" name="editor1" rows="10">
                      <?php echo $page_content->message1; ?>
                                  </textarea>
                                  <script>
      
                                      CKEDITOR.replace('edi');
      
                           </script>    </body>   
      

    This works great for me. Enjoy!

    0 讨论(0)
提交回复
热议问题