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