JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.6.3
[ckeditor.git] / _source / plugins / smiley / plugin.js
index ae2523f..9156be8 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
@@ -9,6 +9,7 @@ CKEDITOR.plugins.add( 'smiley',
 \r
        init : function( editor )\r
        {\r
+               editor.config.smiley_path = editor.config.smiley_path || ( this.path + 'images/' );\r
                editor.addCommand( 'smiley', new CKEDITOR.dialogCommand( 'smiley' ) );\r
                editor.ui.addButton( 'Smiley',\r
                        {\r
@@ -22,15 +23,14 @@ CKEDITOR.plugins.add( 'smiley',
 /**\r
  * The base path used to build the URL for the smiley images. It must end with\r
  * a slash.\r
+ * @name CKEDITOR.config.smiley_path\r
  * @type String\r
- * @default {@link CKEDITOR.basePath} + 'plugins/smiley/images/'\r
+ * @default <code><em>CKEDITOR.basePath</em> + 'plugins/smiley/images/'</code>\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
@@ -58,17 +58,37 @@ CKEDITOR.config.smiley_images = [
  * must match its relative pair in the {@link CKEDITOR.config.smiley_images}\r
  * setting.\r
  * @type Array\r
- * @default (see example)\r
+ * @default  The textual descriptions of smiley.\r
  * @example\r
- * // This is actually the default value.\r
- * config.smiley_descriptions = [\r
- *     ':)', ':(', ';)', ':D', ':/', ':P',\r
- *     '', '', '', '', '', '',\r
- *     '', ';(', '', '', '', '',\r
- *     '', ':kiss', '' ];\r
+ * // Default settings.\r
+ * config.smiley_descriptions =\r
+ *     [\r
+ *         'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',\r
+ *         'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',\r
+ *         'yes', 'heart', 'broken heart', 'kiss', 'mail'\r
+ *     ];\r
+ * @example\r
+ * // Use textual emoticons as description.\r
+ * config.smiley_descriptions =\r
+ *     [\r
+ *         ':)', ':(', ';)', ':D', ':/', ':P', ':*)', ':-o',\r
+ *         ':|', '>:(', 'o:)', '8-)', '>:-)', ';(', '', '', '',\r
+ *         '', '', ':-*', ''\r
+ *     ];\r
+ */\r
+CKEDITOR.config.smiley_descriptions =\r
+       [\r
+               'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',\r
+               'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',\r
+               'yes', 'heart', 'broken heart', 'kiss', 'mail'\r
+       ];\r
+\r
+/**\r
+ * The number of columns to be generated by the smilies matrix.\r
+ * @name CKEDITOR.config.smiley_columns\r
+ * @type Number\r
+ * @default 8\r
+ * @since 3.3.2\r
+ * @example\r
+ * config.smiley_columns = 6;\r
  */\r
-CKEDITOR.config.smiley_descriptions = [\r
-       ':)', ':(', ';)', ':D', ':/', ':P',\r
-       '', '', '', '', '', '',\r
-       '', ';(', '', '', '', '',\r
-       '', ':kiss', '' ];\r