JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.0
[ckeditor.git] / _source / plugins / smiley / plugin.js
diff --git a/_source/plugins/smiley/plugin.js b/_source/plugins/smiley/plugin.js
new file mode 100644 (file)
index 0000000..ae2523f
--- /dev/null
@@ -0,0 +1,74 @@
+/*\r
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+CKEDITOR.plugins.add( 'smiley',\r
+{\r
+       requires : [ 'dialog' ],\r
+\r
+       init : function( editor )\r
+       {\r
+               editor.addCommand( 'smiley', new CKEDITOR.dialogCommand( 'smiley' ) );\r
+               editor.ui.addButton( 'Smiley',\r
+                       {\r
+                               label : editor.lang.smiley.toolbar,\r
+                               command : 'smiley'\r
+                       });\r
+               CKEDITOR.dialog.add( 'smiley', this.path + 'dialogs/smiley.js' );\r
+       }\r
+} );\r
+\r
+/**\r
+ * The base path used to build the URL for the smiley images. It must end with\r
+ * a slash.\r
+ * @type String\r
+ * @default {@link CKEDITOR.basePath} + 'plugins/smiley/images/'\r
+ * @example\r
+ * config.smiley_path = 'http://www.example.com/images/smileys/';\r
+ * @example\r
+ * config.smiley_path = '/images/smileys/';\r
+ */\r
+CKEDITOR.config.smiley_path = CKEDITOR.basePath +\r
+       'plugins/smiley/images/';\r
+\r
+/**\r
+ * The file names for the smileys to be displayed. These files must be\r
+ * contained inside the URL path defined with the\r
+ * {@link CKEDITOR.config.smiley_path} setting.\r
+ * @type Array\r
+ * @default (see example)\r
+ * @example\r
+ * // This is actually the default value.\r
+ * config.smiley_images = [\r
+ *     'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',\r
+ *     'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',\r
+ *     'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',\r
+ *     'broken_heart.gif','kiss.gif','envelope.gif'];\r
+ */\r
+CKEDITOR.config.smiley_images = [\r
+       'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',\r
+       'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',\r
+       'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',\r
+       'broken_heart.gif','kiss.gif','envelope.gif'];\r
+\r
+/**\r
+ * The description to be used for each of the smileys defined in the\r
+ * {@link CKEDITOR.config.smiley_images} setting. Each entry in this array list\r
+ * must match its relative pair in the {@link CKEDITOR.config.smiley_images}\r
+ * setting.\r
+ * @type Array\r
+ * @default (see example)\r
+ * @example\r
+ * // This is actually the default value.\r
+ * config.smiley_descriptions = [\r
+ *     ':)', ':(', ';)', ':D', ':/', ':P',\r
+ *     '', '', '', '', '', '',\r
+ *     '', ';(', '', '', '', '',\r
+ *     '', ':kiss', '' ];\r
+ */\r
+CKEDITOR.config.smiley_descriptions = [\r
+       ':)', ':(', ';)', ':D', ':/', ':P',\r
+       '', '', '', '', '', '',\r
+       '', ';(', '', '', '', '',\r
+       '', ':kiss', '' ];\r