0

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. How do I 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>

4 Answers 4

2

If you are using the Php it's very easy

<?php
include_once(“fckeditor/fckeditor.php”) ;

$sBasePath = $_SERVER[ 'PHP_SELF' ] ;                                                       
$oFCKeditor = new FCKeditor('FCKeditor1') ;                                                   
$oFCKeditor->BasePath = 'fckeditor/' ;                                                       
$oFCKeditor->ToolbarSet = 'Basic';                                                            
$oFCKeditor->Height = 200;                                                                     
$oFCKeditor->Width  = 400;                                                                     
$oFCKeditor->Value = '<p>Now the FCKeditor is available and ready to use. So, just insert the        following code in your p</p>' ;
$oFCKeditor->Create() ;


?>

Put this code in your html.

For more details go to an article in my blog: Basic FCKEditor Integration

Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

FCKeditor 2.x, Developers Guide, PHP 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.

I hope this helps.

Comments

0

CKEdit is just a JavaScript plugin. In order to use it with PHP and MySQL you don't really need to take any specific precautions. You can just follow the guide: FCKeditor 2.x, Developers Guide, 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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.