Inserting Emoticons or Icons using WYSIWYG Editor (TinyMCE)

7 posts by 2 authors in: Forums > CMS Builder
Last Post: September 24, 2013   (RSS)

I am looking for a way to insert Emoticons or Icons just like the uploaded image (pics.jpg) in WYSIWYG Editor (TinyMCE).
Please help! 

Attachments:

pics.jpg 175K

By Daryl - September 20, 2013

Hi yusuketaga,

You can insert emoticons in the WYSIWYG editor by loading the TinyMCE's emotion plugin.

Here's the steps on how to do it:

  1. Create a copy of \cmsAdmin\lib\wysiwyg.php and renamed it as wysiwyg_custom.php
  2. Open wysiwyg_custom.php and add "emotions" in the plugin load functions. There are two functions for loading the plugins so make sure you add it twice. Look for:

    // Load Plugins: ***NOTE*** plugins must be added both loadWysiwygJavascript() and initWysiwyg() (twice in this page, search for "plugins:")
    'plugins' => 'inlinepopups,contextmenu,table,fullscreen,paste,media,spellchecker,emotions',

  3. Then add the emotions button in the WYSIWYG toolbar. Example:

    // Define buttons: Button codes: http://www.tinymce.com/wiki.php/Buttons/controls
    theme_advanced_buttons1 : "formatselect,fontsizeselect,bold,italic,underline,|,justifyleft,justifycenter,justifyright,|,bullist,numlist,|,outdent,indent,|,sub,sup,charmap,|,removeformat,fullscreen",
    theme_advanced_buttons2 : "forecolor,backcolor,|,link,unlink,anchor,|,blockquote,hr,image,media,table,visualaid,|,pastetext,pasteword,|,code,|,spellchecker|,emotions",

Let me know if that works for you.

Cheers!

Daryl

Daryl Maximo
PHP Programmer - interactivetools.com

Hi DMaximo,

Thank you for your reply.

I followed the steps you provided but no luck.
I see no emoticon button next to the spellchecker.
I cleared tinyMCE cache inside the data folder, and of course cleared my browser cache.

Do you have any idea?

By Daryl - September 23, 2013

Hello yusuketaga,

Let's try to see if the emotions plugin is loaded properly.

If you're using Google Chrome, press F12 and go to console tab and refresh the page.

Let us know if you got any errors in your console log.

Daryl Maximo
PHP Programmer - interactivetools.com

By Daryl - September 24, 2013

Hi yuseketaga,

Would you mind if I take a closer look by submitting a second level support request?

You can find the form here: https://www.interactivetools.com/support/email_support_form.php

Thanks,

Daryl

Daryl Maximo
PHP Programmer - interactivetools.com

Hi Daryl,

Thanks!

I'll do so.