JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
6e1804e49b4761318e3cb8deb664c4d1142adb3b
[ckeditor.git] / _source / plugins / smiley / plugin.js
1 /*\r
2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
3 For licensing, see LICENSE.html or http://ckeditor.com/license\r
4 */\r
5 \r
6 CKEDITOR.plugins.add( 'smiley',\r
7 {\r
8         requires : [ 'dialog' ],\r
9 \r
10         init : function( editor )\r
11         {\r
12                 editor.addCommand( 'smiley', new CKEDITOR.dialogCommand( 'smiley' ) );\r
13                 editor.ui.addButton( 'Smiley',\r
14                         {\r
15                                 label : editor.lang.smiley.toolbar,\r
16                                 command : 'smiley'\r
17                         });\r
18                 CKEDITOR.dialog.add( 'smiley', this.path + 'dialogs/smiley.js' );\r
19         }\r
20 } );\r
21 \r
22 /**\r
23  * The base path used to build the URL for the smiley images. It must end with\r
24  * a slash.\r
25  * @type String\r
26  * @default {@link CKEDITOR.basePath} + 'plugins/smiley/images/'\r
27  * @example\r
28  * config.smiley_path = 'http://www.example.com/images/smileys/';\r
29  * @example\r
30  * config.smiley_path = '/images/smileys/';\r
31  */\r
32 CKEDITOR.config.smiley_path = CKEDITOR.basePath +\r
33         '_source/' +            // @Packager.RemoveLine\r
34         'plugins/smiley/images/';\r
35 \r
36 /**\r
37  * The file names for the smileys to be displayed. These files must be\r
38  * contained inside the URL path defined with the\r
39  * {@link CKEDITOR.config.smiley_path} setting.\r
40  * @type Array\r
41  * @default (see example)\r
42  * @example\r
43  * // This is actually the default value.\r
44  * config.smiley_images = [\r
45  *     'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',\r
46  *     'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',\r
47  *     'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',\r
48  *     'broken_heart.gif','kiss.gif','envelope.gif'];\r
49  */\r
50 CKEDITOR.config.smiley_images = [\r
51         'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',\r
52         'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',\r
53         'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',\r
54         'broken_heart.gif','kiss.gif','envelope.gif'];\r
55 \r
56 /**\r
57  * The description to be used for each of the smileys defined in the\r
58  * {@link CKEDITOR.config.smiley_images} setting. Each entry in this array list\r
59  * must match its relative pair in the {@link CKEDITOR.config.smiley_images}\r
60  * setting.\r
61  * @type Array\r
62  * @default (see example)\r
63  * @example\r
64  * // This is actually the default value.\r
65  * config.smiley_descriptions = [\r
66  *     ':)', ':(', ';)', ':D', ':/', ':P',\r
67  *     '', '', '', '', '', '',\r
68  *     '', ';(', '', '', '', '',\r
69  *     '', ':kiss', '' ];\r
70  */\r
71 CKEDITOR.config.smiley_descriptions = [\r
72         ':)', ':(', ';)', ':D', ':/', ':P',\r
73         '', '', '', '', '', '',\r
74         '', ';(', '', '', '', '',\r
75         '', ':kiss', '' ];\r