contributions/javascript.ckeditor/start.inc.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * @defgroup CKEditor 00004 * @ingroup JavaScript 00005 * 00006 * Include CKEditor (http://ckeditor.com/) 00007 * 00008 * @section Usage 00009 * 00010 * On install, the module copies CKEditor files to the a folder named "js/ckeditor" below web root. The version 00011 * of CKEditor installed is 3.5.3. 00012 * 00013 * CKEditor files are not included by default. To enable CKEditor on a page, place the following code 00014 * 00015 * @code 00016 * Load::components('ckeditor'); 00017 * CKEditor::enable($page_data); 00018 * @endcode 00019 * 00020 * This will turn all textareas with class "rte" into a CKEditor instance. 00021 * 00022 * @note It is good practice to use "rte" as classname for rich text editors. 00023 * 00024 * @attention 00025 * The above code only works if javascript.jquery module is enabled, too. If 00026 * you don't user jQuery, you must create you own configuration. 00027 * 00028 * @section Config Creating Configurations 00029 * 00030 * If the default configuration is not sufficent, you may create your own. This is 00031 * a two step process: 00032 * 00033 * - Create and name a config 00034 * - Refer to it by name when enabling editor 00035 * 00036 * First, create a config: 00037 * 00038 * @code 00039 * Load::components('ckeditor'); 00040 * $config CKEditor::create_config('fancy'); 00041 * $config->init_file = 'js/fancy_ck.js'; // JS script to fire up editor 00042 * @endcode 00043 * 00044 * You now can use the config anywhere: 00045 * 00046 * @code 00047 * CKEditor::enable($page_data, 'fancy); 00048 * @endcode 00049 * 00050 * @section Notes Additional notes 00051 * 00052 * CKEditor is released under GPL, LGPL and MPL license. 00053 */ 00054 00055 EventSource::Instance()->register(new JavascriptCKEditorEventSink());