JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.5.4
[ckeditor.git] / _source / core / plugindefinition.js
1 /*\r
2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license\r
4 */\r
5 \r
6 /**\r
7  * @fileOverview Defines the "virtual" {@link CKEDITOR.pluginDefinition} class, which\r
8  *              contains the defintion of a plugin. This file is for documentation\r
9  *              purposes only.\r
10  */\r
11 \r
12 /**\r
13  * (Virtual Class) Do not call this constructor. This class is not really part\r
14  *              of the API. It just illustrates the features of plugin objects to be\r
15  *              passed to the {@link CKEDITOR.plugins.add} function.\r
16  * @name CKEDITOR.pluginDefinition\r
17  * @constructor\r
18  * @example\r
19  */\r
20 \r
21 /**\r
22  * A list of plugins that are required by this plugin. Note that this property\r
23  * doesn't guarantee the loading order of the plugins.\r
24  * @name CKEDITOR.pluginDefinition.prototype.requires\r
25  * @type Array\r
26  * @example\r
27  * CKEDITOR.plugins.add( 'sample',\r
28  * {\r
29  *     requires : [ 'button', 'selection' ]\r
30  * });\r
31  */\r
32 \r
33 /**\r
34  * A list of language files available for this plugin. These files are stored inside\r
35  * the "lang" directory, which is inside the plugin directory, follow the name\r
36  * pattern of "langCode.js", and contain a language definition created with {@link CKEDITOR.pluginDefinition#setLang}.\r
37  * While the plugin is being loaded, the editor checks this list to see if\r
38  * a language file of the current editor language ({@link CKEDITOR.editor#langCode})\r
39  * is available, and if so, loads it. Otherwise, the file represented by the first list item\r
40  * in the list is loaded.\r
41  * @name CKEDITOR.pluginDefinition.prototype.lang\r
42  * @type Array\r
43  * @example\r
44  * CKEDITOR.plugins.add( 'sample',\r
45  * {\r
46  *     lang : [ 'en', 'fr' ]\r
47  * });\r
48  */\r
49 \r
50  /**\r
51  * Function called on initialization of every editor instance created in the\r
52  * page before the init() call task. The beforeInit function will be called for\r
53  * all plugins, after that the init function is called for all of them. This\r
54  * feature makes it possible to initialize things that could be used in the\r
55  * init function of other plugins.\r
56  * @name CKEDITOR.pluginDefinition.prototype.beforeInit\r
57  * @function\r
58  * @param {CKEDITOR.editor} editor The editor instance being initialized.\r
59  * @example\r
60  * CKEDITOR.plugins.add( 'sample',\r
61  * {\r
62  *     beforeInit : function( editor )\r
63  *     {\r
64  *         alert( 'Editor "' + editor.name + '" is to be initialized!' );\r
65  *     }\r
66  * });\r
67  */\r
68 \r
69  /**\r
70  * Function called on initialization of every editor instance created in the\r
71  * page.\r
72  * @name CKEDITOR.pluginDefinition.prototype.init\r
73  * @function\r
74  * @param {CKEDITOR.editor} editor The editor instance being initialized.\r
75  * @example\r
76  * CKEDITOR.plugins.add( 'sample',\r
77  * {\r
78  *     init : function( editor )\r
79  *     {\r
80  *         alert( 'Editor "' + editor.name + '" is being initialized!' );\r
81  *     }\r
82  * });\r
83  */\r