views:

314

answers:

3

I just downloaded fckeditor and dropped the folder into my root directory but I don't know how to install the fckeditor into my forms for example, I wanted to integrate the fckeditor into the About Me and My Interests form fields in the form below, but I don't know how or even how to change the fckeditor skins. Can someone show me how to do this?

I'm using PHP and MySQL

Here is the html.

<form method="post" action="index.php">
    <fieldset>
        <ul>
            <li><label for="about-me">About Me: </label>
            <textarea rows="8" cols="60" name="about-me" id="about-me"></textarea></li>

            <li><label for="my-interests">My Interests: </label>
            <textarea rows="8" cols="60" name="interests" id="interests"></textarea></li>

            <li><input type="submit" name="submit" value="Save Changes" class="save-button" />
        </ul>
    </fieldset>

</form>
A: 

Here is a good guide on integrated FCKEditor into php. You include the file, create an object, assign some parameters and you're good to go. It's pretty easy and useful.

http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Integration/PHP

Hope this helps.

Jeremy Morgan
A: 

CKEdit is just a Javascript plugin, In order to use it with PHP/MySQL you don't really need to take any specific precautions. You can just follow this guide:

http://docs.cksource.com/FCKeditor_2.x/Developers_Guide/Integration/JavaScript

Head:

<script type="text/javascript" src="fckeditor/fckeditor.js"></script>

Body:

<script type="text/javascript">
var oFCKeditor = new FCKeditor('FCKeditor1');
oFCKeditor.BasePath = "/fckeditor/";
oFCKeditor.Create();
</script>

Where you replace: "FCKeditor1" in the above example with "about-me", and again for your "interests" field.

Dean
A: 

For example I do next action:

First write on section that code

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>

Second

<textarea cols="80" id="FCKeditor1" name="FCKeditor1" rows="10"></textarea>
<script type="text/javascript">
    CKEDITOR.replace( 'FCKeditor1',{
        toolbar : 'Full',
        skin:'kama'
    } );
</script>

after that action I saw on my browser ckeditor.

Evgeniy