Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ssougnez 85 posts 289 karma points c-trib
    May 20, 2018 @ 01:29
    ssougnez
    0

    Hi,

    I'm currently trying to make the "codesample" button appear in tinyMCE. I did that but I have a small issue.. The button is there but the icon does not appear. So I can click on it because I know it's there, but I don't see it :-D

    I added these lines in tinyMceConfig.config:

    <command>
      <umbracoAlias>codeSample</umbracoAlias>
      <name>Code snippet</name>
      <icon>images/editor/charmap.gif</icon>
      <tinyMceCommand value="" userInterface="true" frontendCommand="codesample">codesample</tinyMceCommand>
      <priority>75</priority>
    </command>
    
    ...
    
    <plugin loadOnFrontend="true">codesample</plugin>
    

    I chose "images/editor/charmap.gif" because I did a copy/paste of the "charmap" command for my test. However, the weird thing is that the icon for "charmap" command appears but not the one for codesample o_O

    Another weird thing is that when I check at the source code of the buttons, there is no reference to the gif image, only a class "icon-tv" applied to the charmap command.

    From what I see, the issue is located in the class of the "i" element of the button. Instead of "mce-ico mce-i-codesample", I should have "mce-ico mce-i-custom icon-code". However, I have no idea how to define that.

    I didn't try yet to put a reference to another gif image (a custom one) because 1) I wouldn't know where to put it and 2) I'd prefer to use the same system as the other button (meaning, an css icon)...

Please Sign in or register to post replies

Write your reply to:

Draft