Topic: Adding more Emoticon to CKEditor

Hello,

May I know how can you add more emoticons to the CKeditor (add news)? Thanks!

Re: Adding more Emoticon to CKEditor

Problem solved. https://cutephp.com/forum/style_emoticons/default/smile.gif

3 (edited by 2013-08-10 15:27:53)

Re: Adding more Emoticon to CKEditor

would you like to share with us? https://cutephp.com/forum/style_emoticons/default/smile.gif

Re: Adding more Emoticon to CKEditor

You want to open: CuteNews -> Core -> ckeditor -> ckeditor.js in a text editing application (I.E. Notepad, however I prefer Crimson Editor).

It's going to look insane at first glance, but be patient. You're looking for:

i.smiley_images=['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'];i.smiley_descriptions=['smiley','sad','wink','laugh','frown','cheeky','blush','surprise','indecision','angry','angel','cool','devil','crying','enlightened','no','yes','heart','broken heart','kiss','mail'];

Focus on this section, and this section alone, it's all you need. In fact, what I did to ease my mind, was break the code (meaning, right before the "i" in "i.smiley_images" I pressed enter twice. I did the same thing right before the "i" in "i.smiley_description" and again one last time after "'mail'];" to make it easier.

The code above is broken into two parts. First the image file name including extension, and then a name for that file.

For example, say you only had one smiley, named "smile.gif". Then your code will look like this:

i.smiley_images=['smile.gif'];i.smiley_descriptions=['smile'];

Also, the order you put the smileys in is the order they're displayed in CKEditor. You must make sure that i.smile_images and i.smile_descriptions follow the same order. What I did to make this easier, I erased all the smileys and added them in one at a time. I didn't test it, but I'm pretty sure you can use .PNG icons, if you'd like.

I understand that a lot of you get freaked out when reading code, like I used to when I began my adventure. I'm going to include my personal ckeditor.js file. It's exactly the same as the one that comes default in 1.5.3, but I spaced out the smiley section for easier editing and I replaced all of the smileys. I'll also include a screen shot of what my CKEditor looks like when you click to add smileys.

Hope this helps someone! https://cutephp.com/forum/style_emoticons/default/smile.gif

Re: Adding more Emoticon to CKEditor

One thing I forgot to mention, just to avoid any confusion, in the code I provided as example if there was only one smiley, the code would look like this if you had two smileys, one named smile and one named wink

i.smiley_images=['smile.gif', 'wink.gif'];i.smiley_descriptions=['smile', 'wink'];

Make sure you enclose both the file name and the description in single quotes ( '  ' ) and you separate each item with a comma ( 'file1.ext', 'file2.ext' )

Good luck!

6 (edited by 2015-07-10 01:02:53)

Re: Adding more Emoticon to CKEditor

open: CuteNews -> Core -> ckeditor -> ckeditor.js in a text editing application (I.E. Notepad, however I prefer Crimson Editor).

i.smiley_images=['smile.gif'];i.smiley_descriptions=['smile'];

the order you put the smileys in is the order they're displayed in CKEditor. screenshot mac You must make sure that i.smile_images and i.smile_descriptions follow the same order.

Re: Adding more Emoticon to CKEditor

Best Crazy Games is a game publisher made to provide the best online games on the web. Every day we publish new fresh games with high and quality gameplay.

https://www.facebook.com/playcraygamesonline

Re: Adding more Emoticon to CKEditor

Best Crazy Games is a game publisher made to provide the best online games on the web. Every day we publish new fresh games with high and quality gameplay.

https://twitter.com/crazygamesonli1

Re: Adding more Emoticon to CKEditor

However, in these races, you don't just gamble for first place and a reputation with your friends. Sometimes there are other types of prizes involved: money, new cars, more complicated race tracks

https://www.bestcrazygames.com/tags