iam using ckeditor in my website to add the content to the pages.
But I’m not able to understand how I get this content in ckeditor for editing it later…
How to load content into the ckeditor? Iam using the following code to load the editor:
if ( !@file_exists( '../../ckeditor/ckeditor.php' ) )
{
if ( @file_exists('../../ckeditor/ckeditor.js') || @file_exists('../../../ckeditor/ckeditor_source.js') )
printNotFound('CKEditor 3.1+');
else
printNotFound('CKEditor');
}
include_once '../../ckeditor/ckeditor.php';
include_once '../../ckfinder/ckfinder.php';
// This is a check for the CKEditor class. If not defined, the paths in lines 57 and 70 must be checked.
if (!class_exists('CKEditor'))
{
printNotFound('CKEditor');
}
else
{
$ckeditor = new CKEditor();
$ckeditor->basePath = '../../ckeditor/';
$ckfinder = new CKFinder();
$ckfinder->BasePath = '../../ckfinder/'; // Note: BasePath property in CKFinder class starts with capital letter
$ckfinder->SetupCKEditorObject($ckeditor);
$ckeditor->editor('message');
}
One way is to pre-populate the
<textarea>field with the appropriate (htmlentities()processed) HTML content. CKEditor will automatically fetch the data, and insert it into the WYSIWYG editor.See the Integration chapter in the developers guide