como arreglar ckeditor con codeigniter

i am looking to add the ck editor in my website where i want to insert data from back end.i think ck editor is best for this.i searched lots of about this but failed to achieve. please let me know how to do this in codeigniter.

i am getting really confused about using it.some says it will achieve through <textfield> and some people are works with helper and controller.please guide me to achieve this.step by step answer would be appreciated.

i tried this code on my view:

<?php



include_once  (BASEPATH.'ckeditor/ckeditor.php');

$ckeditor = new CKEditor();
$ckeditor->basePath = '/ckeditor/';
$ckeditor->config['filebrowserBrowseUrl'] = '/ckfinder/ckfinder.html';
$ckeditor->config['filebrowserImageBrowseUrl'] = '/ckfinder/ckfinder.html?type=Images';
$ckeditor->config['filebrowserFlashBrowseUrl'] = '/ckfinder/ckfinder.html?type=Flash';
$ckeditor->config['filebrowserUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files';
$ckeditor->config['filebrowserImageUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images';
$ckeditor->config['filebrowserFlashUploadUrl'] = '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash';
$ckeditor->editor('CKEditor1');

?>

and include the js :

<script type="text/javascript" src="<?php echo base_url(); ?>assets/admin/ckeditor/ckeditor.js"></script>

but this url for load the js is failed.please help.

preguntado el 28 de agosto de 12 a las 13:08

@DaveP please look at my updated question. -

If you look at the html source on the <script... tag, is the generated url correct - in other words is base_url() colocado correctamente en application/config/config.php? -

@DaveP i checked it is correct. -

1 Respuestas

To install the ck editor in codeignitor you just have to follow the below steps:- 1.put the ck editor folder in assets(or in which you want).and give the proper path to js file. 2.now in your view section just include the js file like that:

<script type="text/javascript" src="<?php echo base_url(); ?>assets/admin/ckeditor/ckeditor.js"></script>

3.ahora en el mismo archivo pon este código:-

<textarea class="ckeditor" name="editor1"></textarea>

4.ahora puede ver el editor en su navegador.

Respondido 28 ago 12, 15:08

should i create the folder assets? - Dev

no dev its not necessary you can put the ckeditor file wherever you want.but have to give proper path. - Harshal Mahajan

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.