]>
git.immae.eu Git - perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git/blob - sources/plugins/smiley/plugin.js
2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
6 CKEDITOR
.plugins
.add( 'smiley', {
8 // jscs:disable maximumLineLength
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%
10 // jscs:enable maximumLineLength
11 icons: 'smiley', // %REMOVE_LINE_CORE%
12 hidpi: true, // %REMOVE_LINE_CORE%
13 init: function( editor
) {
14 editor
.config
.smiley_path
= editor
.config
.smiley_path
|| ( this.path
+ 'images/' );
15 editor
.addCommand( 'smiley', new CKEDITOR
.dialogCommand( 'smiley', {
16 allowedContent: 'img[alt,height,!src,title,width]',
17 requiredContent: 'img'
19 editor
.ui
.addButton
&& editor
.ui
.addButton( 'Smiley', {
20 label: editor
.lang
.smiley
.toolbar
,
24 CKEDITOR
.dialog
.add( 'smiley', this.path
+ 'dialogs/smiley.js' );
29 * The base path used to build the URL for the smiley images. It must end with a slash.
31 * config.smiley_path = 'http://www.example.com/images/smileys/';
33 * config.smiley_path = '/images/smileys/';
35 * @cfg {String} [smiley_path=CKEDITOR.basePath + 'plugins/smiley/images/']
36 * @member CKEDITOR.config
40 * The file names for the smileys to be displayed. These files must be
41 * contained inside the URL path defined with the {@link #smiley_path} setting.
43 * // This is actually the default value.
44 * config.smiley_images = [
45 * 'regular_smile.png','sad_smile.png','wink_smile.png','teeth_smile.png','confused_smile.png','tongue_smile.png',
46 * 'embarrassed_smile.png','omg_smile.png','whatchutalkingabout_smile.png','angry_smile.png','angel_smile.png','shades_smile.png',
47 * 'devil_smile.png','cry_smile.png','lightbulb.png','thumbs_down.png','thumbs_up.png','heart.png',
48 * 'broken_heart.png','kiss.png','envelope.png'
52 * @member CKEDITOR.config
54 CKEDITOR
.config
.smiley_images
= [
55 'regular_smile.png', 'sad_smile.png', 'wink_smile.png', 'teeth_smile.png', 'confused_smile.png', 'tongue_smile.png',
56 'embarrassed_smile.png', 'omg_smile.png', 'whatchutalkingabout_smile.png', 'angry_smile.png', 'angel_smile.png', 'shades_smile.png',
57 'devil_smile.png', 'cry_smile.png', 'lightbulb.png', 'thumbs_down.png', 'thumbs_up.png', 'heart.png',
58 'broken_heart.png', 'kiss.png', 'envelope.png'
62 * The description to be used for each of the smileys defined in the
63 * {@link CKEDITOR.config#smiley_images} setting. Each entry in this array list
64 * must match its relative pair in the {@link CKEDITOR.config#smiley_images}
67 * // Default settings.
68 * config.smiley_descriptions = [
69 * 'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',
70 * 'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',
71 * 'yes', 'heart', 'broken heart', 'kiss', 'mail'
74 * // Use textual emoticons as description.
75 * config.smiley_descriptions = [
76 * ':)', ':(', ';)', ':D', ':/', ':P', ':*)', ':-o',
77 * ':|', '>:(', 'o:)', '8-)', '>:-)', ';(', '', '', '',
82 * @member CKEDITOR.config
84 CKEDITOR
.config
.smiley_descriptions
= [
85 'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',
86 'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',
87 'yes', 'heart', 'broken heart', 'kiss', 'mail'
91 * The number of columns to be generated by the smilies matrix.
93 * config.smiley_columns = 6;
96 * @cfg {Number} [smiley_columns=8]
97 * @member CKEDITOR.config