WebDirect

Welcome to WebDirect basics.

<-- Back to Training Home

FCKeditor is a very valuable tool in our developing of web pages. It is a WYSIWYG text editor for the web:

FCKeditor does not work in the secure folder.
to create an instance of FCKeditor on a page, simply follow this pattern:

    <?php
    include_once("/srv/www/law2/docs/billings/fckeditor/fckeditor.php");
    $oFCKeditor = new FCKeditor('FCKeditor1');
        $oFCKeditor->BasePath = 'http://www.law2.byu.edu/billings/fckeditor/';
        $oFCKeditor->Value = "Hello PHP";    
        $oFCKeditor->Height = 400;
        $oFCKeditor->Width = 600;
        $oFCKeditor->Create();
    ?>

As you can see, there is a copy of fckeditor at docs/billings/fckeditor.
whenever you need to use fckeditor, go ahead and grab this copy and move it to the new folder you will use it in.

FCKeditor fields can be used in a form just like any other form element.
As long as it is declared within the form, the *name* you give it will be the corresponding value to the $_POST[*name*] variable when it is posted. (in the above case, the name is 'FCKeditor1'... therefore, $_POST['FCKeditor1'] will return the value in the box if it were to be posted.)