JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2.2
[ckeditor.git] / _source / plugins / smiley / plugin.js
index 6e1804e..4d509ae 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, 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,6 +23,7 @@ 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
  * @example\r
@@ -29,9 +31,6 @@ CKEDITOR.plugins.add( 'smiley',
  * @example\r
  * config.smiley_path = '/images/smileys/';\r
  */\r
-CKEDITOR.config.smiley_path = CKEDITOR.basePath +\r
-       '_source/' +            // @Packager.RemoveLine\r
-       'plugins/smiley/images/';\r
 \r
 /**\r
  * The file names for the smileys to be displayed. These files must be\r
@@ -59,17 +58,27 @@ 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
-       ':)', ':(', ';)', ':D', ':/', ':P',\r
-       '', '', '', '', '', '',\r
-       '', ';(', '', '', '', '',\r
-       '', ':kiss', '' ];\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