]> git.immae.eu Git - perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git/blame - sources/plugins/smiley/plugin.js
Upgrade to 4.5.7 and add some plugin
[perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git] / sources / plugins / smiley / plugin.js
CommitLineData
7adcb81e 1/**\r
3b35bd27 2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.\r
7adcb81e
IB
3 * For licensing, see LICENSE.md or http://ckeditor.com/license\r
4 */\r
5\r
6CKEDITOR.plugins.add( 'smiley', {\r
7 requires: 'dialog',\r
8 // jscs:disable maximumLineLength\r
3b35bd27 9 lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%\r
7adcb81e
IB
10 // jscs:enable maximumLineLength\r
11 icons: 'smiley', // %REMOVE_LINE_CORE%\r
12 hidpi: true, // %REMOVE_LINE_CORE%\r
13 init: function( editor ) {\r
14 editor.config.smiley_path = editor.config.smiley_path || ( this.path + 'images/' );\r
15 editor.addCommand( 'smiley', new CKEDITOR.dialogCommand( 'smiley', {\r
16 allowedContent: 'img[alt,height,!src,title,width]',\r
17 requiredContent: 'img'\r
18 } ) );\r
19 editor.ui.addButton && editor.ui.addButton( 'Smiley', {\r
20 label: editor.lang.smiley.toolbar,\r
21 command: 'smiley',\r
22 toolbar: 'insert,50'\r
23 } );\r
24 CKEDITOR.dialog.add( 'smiley', this.path + 'dialogs/smiley.js' );\r
25 }\r
26} );\r
27\r
28/**\r
29 * The base path used to build the URL for the smiley images. It must end with a slash.\r
30 *\r
31 * config.smiley_path = 'http://www.example.com/images/smileys/';\r
32 *\r
33 * config.smiley_path = '/images/smileys/';\r
34 *\r
35 * @cfg {String} [smiley_path=CKEDITOR.basePath + 'plugins/smiley/images/']\r
36 * @member CKEDITOR.config\r
37 */\r
38\r
39/**\r
40 * The file names for the smileys to be displayed. These files must be\r
41 * contained inside the URL path defined with the {@link #smiley_path} setting.\r
42 *\r
43 * // This is actually the default value.\r
44 * config.smiley_images = [\r
45 * 'regular_smile.png','sad_smile.png','wink_smile.png','teeth_smile.png','confused_smile.png','tongue_smile.png',\r
46 * 'embarrassed_smile.png','omg_smile.png','whatchutalkingabout_smile.png','angry_smile.png','angel_smile.png','shades_smile.png',\r
47 * 'devil_smile.png','cry_smile.png','lightbulb.png','thumbs_down.png','thumbs_up.png','heart.png',\r
48 * 'broken_heart.png','kiss.png','envelope.png'\r
49 * ];\r
50 *\r
51 * @cfg\r
52 * @member CKEDITOR.config\r
53 */\r
54CKEDITOR.config.smiley_images = [\r
55 'regular_smile.png', 'sad_smile.png', 'wink_smile.png', 'teeth_smile.png', 'confused_smile.png', 'tongue_smile.png',\r
56 'embarrassed_smile.png', 'omg_smile.png', 'whatchutalkingabout_smile.png', 'angry_smile.png', 'angel_smile.png', 'shades_smile.png',\r
57 'devil_smile.png', 'cry_smile.png', 'lightbulb.png', 'thumbs_down.png', 'thumbs_up.png', 'heart.png',\r
58 'broken_heart.png', 'kiss.png', 'envelope.png'\r
59];\r
60\r
61/**\r
62 * The description to be used for each of the smileys defined in the\r
63 * {@link CKEDITOR.config#smiley_images} setting. Each entry in this array list\r
64 * must match its relative pair in the {@link CKEDITOR.config#smiley_images}\r
65 * setting.\r
66 *\r
67 * // Default settings.\r
68 * config.smiley_descriptions = [\r
69 * 'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',\r
70 * 'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',\r
71 * 'yes', 'heart', 'broken heart', 'kiss', 'mail'\r
72 * ];\r
73 *\r
74 * // Use textual emoticons as description.\r
75 * config.smiley_descriptions = [\r
76 * ':)', ':(', ';)', ':D', ':/', ':P', ':*)', ':-o',\r
77 * ':|', '>:(', 'o:)', '8-)', '>:-)', ';(', '', '', '',\r
78 * '', '', ':-*', ''\r
79 * ];\r
80 *\r
81 * @cfg\r
82 * @member CKEDITOR.config\r
83 */\r
84CKEDITOR.config.smiley_descriptions = [\r
85 'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',\r
86 'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',\r
87 'yes', 'heart', 'broken heart', 'kiss', 'mail'\r
88];\r
89\r
90/**\r
91 * The number of columns to be generated by the smilies matrix.\r
92 *\r
93 * config.smiley_columns = 6;\r
94 *\r
95 * @since 3.3.2\r
96 * @cfg {Number} [smiley_columns=8]\r
97 * @member CKEDITOR.config\r
98 */\r