Log in or register to post comments
Last post
creamneuron's picture
Joined: 13/12/2009
Posts: 2
Add more smileys to CKeditor?
Hi!

I just installed the new CKeditor on my drupal project. So there is this Smiley-plugin, with the folder where the .gif are placed. Now, my "client" want MORE smileys..... (yes, female.... :D ;) :mrgreen: :lol: :P :roll:

So i took some other .gif images and put that in the image folder of the smiley-plugin, but they are not listed in the popup, when i click the "add smiley" button.

So whats the trick? Anyone can help me out here? =)


Cream
lsv
lsv's picture
Joined: 03/11/2009
Posts: 2
Re: Add more smileys to CKeditor?
CKEDITOR.config.smiley_images= [];
CKEDITOR.config.smiley_descriptions= [];

Fx.
CKEDITOR.config.smiley_images= ['smile.gif', 'mad.gif'];
CKEDITOR.config.smiley_descriptions= [':-)', ':-('];

My customer wanted the Messenger smileys, so what I did was
add a new directory under
ckeditor/plugins/smiley/images/msn

and uploaded the new smileys here

Then I added this

config.smiley_path=CKEDITOR.basePath+'plugins/smiley/images/msn/';
config.smiley_images=['angel_smile.gif', 'angry_smile.gif', 'broken_heart.gif', 'cake.gif', 'confused_smile.gif', 'cry_smile.gif', 'devil_smile.gif', 'embaressed_smile.gif', 'envelope.gif', 'heart.gif', 'kiss.gif', 'lightbulb.gif', 'omg_smile.gif', 'regular_smile.gif', 'sad_smile.gif', 'shades_smile.gif', 'teeth_smile.gif', 'thumbs_down.gif', 'thumbs_up.gif', 'tounge_smile.gif', 'whatchutalkingabout_smile.gif', 'wink_smile.gif'];
config.smiley_descriptions=['', ':(', '', '', ':~', ':\'(', '', '', '', '', '', '', ':-O', ':-)', ':-(', '8-)', ':D', '', '', ':-P', ':|', ';-)'];


into my config.js
creamneuron's picture
Joined: 13/12/2009
Posts: 2
Re: Add more smileys to CKeditor?
Ok, im not sure if i understand this.

In the config.js i have to add the filenames?
I'm a bit irritaded, because that was the way i tried it.
i looked in this file and found the line (config.smiley_images....), where all imamgefiles are added. I tried to add 2 new gif-files and added the filenames in that line. But they did not show up in the selection-menu for the smileys. I am quite sure that i did it right (no misspelling, etc)

When you made a new directory with new smileys, did you add a second "config.smiley_path" line in the config-file? or did you swap the smileys?
Maybe i have to make a new directory and new lines?

I will try a new dir with new lines. maybe i messed something up when i mixed the new to the old smileys.
ck_gc's picture
Joined: 10/04/2011
Posts: 6
Re: Add more smileys to CKeditor?
To add new smileys to the editor, search the ckeditor directory for "angel_smile" - it appears in two files.
(as it is one of the default images)

"\ckeditor\_source\plugins\smiley\plugin.js" and "\ckeditor\ckeditor.js"

Add the new descriptions and image names to these lists, and then copy the smiley images to the location below

"\ckeditor\plugins\smiley\images\"
mhmdgomma's picture
Joined: 03/07/2013
Posts: 1
I followed your instructions

I followed your instructions but nothing changed .