Welcome Guest, Not a member yet? Register   Sign In
fckeditor with codeigniter
#7

[eluser]LuckyFella73[/eluser]
hi crwtrue,

like posted before I have no experience with uploading file via
fckeditor. In a project I did a while ago I had this js in my
header:
Code:
[removed][removed]
    <s+c+r+i+pt type="text/j+a+v+a+s+c+r+i+p+t">
window.onload = function()
{
    // Automatically calculates the editor base path based on the _samples directory.
    // This is usefull only for these samples. A real application should use something like this:
    // oFCKeditor.BasePath = '/fckeditor/' ;    // '/fckeditor/' is the default value.
    //var sBasePath = document.location.href.substring(0,document.location.href.lastIndexOf('_samples')) ;

    var teaser_editor = new FCKeditor('teaser');
    teaser_editor.ToolbarSet = 'mkb_slim';
    teaser_editor.BasePath    = '&lt;?php echo(base_url());?&gt;javascript/fckeditor/' ;
    teaser_editor.ReplaceTextarea() ;
}
</s+c+r+i+p+t>

The effect is that all form elements type textarea become a rich-text-editor.
Thats all I needed that time. "mkb_slim" is a manually defined toolbarset I
defined. You could take a standard toolbarset privided with the donwnload
package. Additionally I had an input field type "file" and sent the form to
my controller using the CI fileupload class. I don't know if you can modify
fck editor to use the CI upload class but even if you want to do that there
is no reason to modify because you can just use the CI upload class. Or did
I misunderstand you?

Have a look at the fck docs - here is a link how to set up fck editor 2.x:
http://docs.fckeditor.net/FCKeditor_2.x/...JavaScript


Messages In This Thread
fckeditor with codeigniter - by El Forum - 08-30-2009, 10:54 PM
fckeditor with codeigniter - by El Forum - 08-31-2009, 12:35 AM
fckeditor with codeigniter - by El Forum - 08-31-2009, 01:30 AM
fckeditor with codeigniter - by El Forum - 08-31-2009, 05:39 AM
fckeditor with codeigniter - by El Forum - 08-31-2009, 06:25 AM
fckeditor with codeigniter - by El Forum - 08-31-2009, 03:19 PM
fckeditor with codeigniter - by El Forum - 09-01-2009, 02:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB