I am making a helper for using in CodeIgniter (PHP), it is not finished yet, but it works.
Look at CodeIgniter forum: http://codeigniter.com/forums/viewthread/127374/
Minimized version:
ckeditor_helper.php
<?php if(!defined('BASEPATH')) exit('No direct script access allowed'); function form_ckeditor($data) { return < script type="text/javascript" src="'.base_url().'application/plugins/ckeditor/ckeditor.js"></script>' . '<script type="text/javascript">CKEDITOR.replace("'.$data['id'].'");</script>'; }