Install CKEditor

 ADD CKeditor To Page

To use the ckeditor we need to include the ckeditor.js file located in root file of the ckeditor library.

<!DOCTYPE html>
        <meta charset="utf-8">
        <title>A Simple Page with CKEditor</title>
        <!-- Make sure the path to CKEditor is correct. -->
        <script src="/path/to/ckeditor/ckeditor.js"></script>
            This textarea field will be replaced with the wysiwyg(ckeditor)
            NOTE: the id, we need this to tell the editor which textarea to replace.
            <textarea name="editor1" id="editor1" rows="10" cols="80">
                This is my textarea to be replaced with CKEditor.
                // Replace the <textarea id="editor1"> with a CKEditor
                // instance, using default configuration.
                //passing the id of the field to replace
                CKEDITOR.replace( 'editor1' );

Avoiding Encoding Issues

To avoid problems with character encoding, use UTF-8 for your websites and your database. Just set the <meta> element for your pages to:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

if you are using html 5, use the followign instead

<meta charset="utf-8">


Cookbook Category: 

Add new comment