Now that the new 3.1 version of CKeditor came out I was quick to test it out. Works great and there's some nice added features like the PHP support. Now I can create the ckeditor instance through PHP alone as follows: (from sample code)
The problem is that I don't know how to integrate ckfinder into this php instance now. I've only been able to do that with javascript as follows:
It's easy with javascript, but how do I integrate using the PHP version of ckeditor?
// Create class instance. $CKEditor = new CKEditor(); // Do not print the code directly to the browser, return it instead //$CKEditor->returnOutput = true; // Path to CKEditor directory, ideally instead of relative dir, use an absolute path: $CKEditor->basePath = '/ckeditor/'; // Set global configuration (will be used by all instances of CKEditor). //$CKEditor->config['width'] = 600; // Change default textarea attributes $CKEditor->textareaAttributes = array("cols" => 80, "rows" => 10); //$CKEditor->config['height'] = 300; //$CKEditor->config['uiColor'] = '#0080FF'; // The initial value to be displayed in the editor. $initialValue = html_entity_decode(stripslashes($body)); $CKEditor->config['customConfig'] = '/ckeditor/custom/configProjectEdits.js'; echo "replacing $body_id<br>"; $CKEditor->replace("$body_id"); // Create first instance. //$code = $CKEditor->editor($body_id, $initialValue);
The problem is that I don't know how to integrate ckfinder into this php instance now. I've only been able to do that with javascript as follows:
<script type="text/javascript"> var editor = CKEDITOR.replace( '<?php echo $body_id; ?>' ); CKFinder.SetupCKEditor( editor ) ; </script>
It's easy with javascript, but how do I integrate using the PHP version of ckeditor?
Re: CKfinder integrated into CKeditor PHP