bde383b56d5e1ef35b32c66390f6b14cc65fd41e
2 Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.html or http://ckeditor.com/license
6 CKEDITOR
.plugins
.add( 'smiley',
8 requires
: [ 'dialog' ],
10 init : function( editor
)
12 editor
.config
.smiley_path
= editor
.config
.smiley_path
|| ( this.path
+ 'images/' );
13 editor
.addCommand( 'smiley', new CKEDITOR
.dialogCommand( 'smiley' ) );
14 editor
.ui
.addButton( 'Smiley',
16 label
: editor
.lang
.smiley
.toolbar
,
19 CKEDITOR
.dialog
.add( 'smiley', this.path
+ 'dialogs/smiley.js' );
24 * The base path used to build the URL for the smiley images. It must end with
26 * @name CKEDITOR.config.smiley_path
28 * @default {@link CKEDITOR.basePath} + 'plugins/smiley/images/'
30 * config.smiley_path = 'http://www.example.com/images/smileys/';
32 * config.smiley_path = '/images/smileys/';
36 * The file names for the smileys to be displayed. These files must be
37 * contained inside the URL path defined with the
38 * {@link CKEDITOR.config.smiley_path} setting.
40 * @default (see example)
42 * // This is actually the default value.
43 * config.smiley_images = [
44 * 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',
45 * 'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
46 * 'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',
47 * 'broken_heart.gif','kiss.gif','envelope.gif'];
49 CKEDITOR
.config
.smiley_images
= [
50 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',
51 'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
52 'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',
53 'broken_heart.gif','kiss.gif','envelope.gif'];
56 * The description to be used for each of the smileys defined in the
57 * {@link CKEDITOR.config.smiley_images} setting. Each entry in this array list
58 * must match its relative pair in the {@link CKEDITOR.config.smiley_images}
61 * @default The textual descriptions of smiley.
63 * // Default settings.
64 * config.smiley_descriptions =
66 * 'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',
67 * 'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',
68 * 'yes', 'heart', 'broken heart', 'kiss', 'mail'
71 * // Use textual emoticons as description.
72 * config.smiley_descriptions =
74 * ':)', ':(', ';)', ':D', ':/', ':P', ':*)', ':-o',
75 * ':|', '>:(', 'o:)', '8-)', '>:-)', ';(', '', '', '',
79 CKEDITOR
.config
.smiley_descriptions
=
81 'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',
82 'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',
83 'yes', 'heart', 'broken heart', 'kiss', 'mail'
87 * The number of columns to be generated by the smilies matrix.
88 * @name CKEDITOR.config.smiley_columns
93 * config.smiley_columns = 6;