Welcome Guest, Not a member yet? Register   Sign In
[solved] FCKEditor integration
#1

[eluser]Skuja[/eluser]
Hi everyone!
I am trying to integrate FCKEditor into my project and i am studying this wiki article:
http://codeigniter.com/wiki/FCKeditor/
But i can't understand how should Library file look, could someone paste some working sample library code to look at ?
EDITED:
finally i made FCKEditor working.
Things i did to make it work:
1)stored fckeditor folder in my project root directory
2)made a copy fckeditor_php5.php content in a application/libraries/Fckeditor.php
3)renamed class name from FCKeditor to Fckeditor
4)edited function IsCompatible() content with FCKeditor_IsCompatibleBrowser() (which can be found in a fckeditor.php )
This goes into the controller:
Code:
function my_function()
     {
         $this->load->library('fckeditor', 'FCKEDITOR1');
         $this->fckeditor->BasePath = base_url().'/fckeditor/';
         $data['fck'] = $this->fckeditor->CreateHtml();            
         $this->load->view('my_view',$data);
     }
This goes into the view:
Code:
<?=form_open('my_controller/my_function')?>
<?=$fck?>
<?=form_close()?>
Hope this will help
P.S. Maybe someone could show, how to make this work on both: php4 and php5




Theme © iAndrew 2016 - Forum software by © MyBB