Copied to clipboard

Flag this post as spam?

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


  • Paul Lagmark 65 posts 140 karma points
    May 14, 2016 @ 13:03
    Paul Lagmark
    0

    TinyMCE custom colors

    Hi all!

    Im struggling with the TinyMCE editor. I have succeded in adding textcolor-option in the editor by adding:

    <command>
      <umbracoAlias>mceForeColor</umbracoAlias>
      <icon>images/editor/forecolor.gif</icon>
      <tinyMceCommand value="" userInterface="true" frontendCommand="forecolor">forecolor</tinyMceCommand>
      <priority>19</priority>
    </command>
    

    I have found that I should add:

    <config key="theme_umbraco_more_colors">false</config>
    <config key="theme_umbraco_text_colors">000000,0079E3,FF0033</config>
    

    in the customConfig section of tinyMceConfig wich I have done. Still, it doesn't work.

    I have rebuilt and "touched" the web.config etc, nothing works.

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    May 14, 2016 @ 14:04
    Dennis Adolfi
    0

    Hi Paul.

    Try adding this to your plugins secttion in tinyMce.config:

    <plugin loadOnFrontend="true">textcolor</plugin>
    

    Good luck!

  • Paul Lagmark 65 posts 140 karma points
    May 14, 2016 @ 14:35
    Paul Lagmark
    1

    My plugins-section looks like this:

    <plugins>
    <plugin loadOnFrontend="true">code</plugin>
    <plugin loadOnFrontend="true">codemirror</plugin>
    <plugin loadOnFrontend="true">paste</plugin>
    <plugin loadOnFrontend="true">umbracolink</plugin>
    <plugin loadOnFrontend="true">anchor</plugin>
    <plugin loadOnFrontend="true">charmap</plugin>
    <plugin loadOnFrontend="true">table</plugin>
    <plugin loadOnFrontend="true">lists</plugin>
    <plugin loadOnFrontend="true">textcolor</plugin></plugins>
    

    So it looks like I already have that setting.

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    May 14, 2016 @ 14:45
    Dennis Adolfi
    0

    Strange. Im using the exact same code as you´ve posted (the command, the two configs and the plugin) in this thread, with no modification, and it works for me. See image:

    enter image description here

    Remember that the textcolor option does´nt automaticly show up in your RTE, you have to configure the datatype in the Developer section, and allow that option for the RTE. Have you done that?

    Also, bump ypur clientdependancy version number, just to be sure.

    Good luck!!

    enter image description here

  • Bjarne Fyrstenborg 1282 posts 3994 karma points MVP 8x c-trib
    May 14, 2016 @ 15:44
    Bjarne Fyrstenborg
    1

    Hi Dennis

    I have added a PR that was merged in v. 7.4.2.. which change the icons in richtext editor config to use font icons that are used in the tinymce toolbar. Furthermore I also added a name element in config, which set a prettier name in the settings than alias but fallback for alias so it doesn't break anything on upgrade if you forget to merge or not include it in new commands. http://issues.umbraco.org/issueMobile/U4-7916

    So you should be able to name it Fore Color instead of mceforecolor..

    /Bjarne

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    May 14, 2016 @ 17:21
    Dennis Adolfi
    0

    That's is awesome Bjarne, thank you!! Really good to know for the future, it looked quite annoying with mceforecolor.

    Did it work out for you Paul?

  • Paul Lagmark 65 posts 140 karma points
    May 15, 2016 @ 17:59
    Paul Lagmark
    0

    It works when it comes to getting the colorpicker in the editor. But I fail to add my own custom color to the colorpicker..

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    May 15, 2016 @ 18:47
    Dennis Adolfi
    0

    Ah yeah I see. I only focused on the fact to get the color picker to work, didn't notice the custom colors. Yeah that it strange, I saw a couple of tutorials and they all did like you've done. Maybe they changed it in the later versions?. Can help you with that I'm sorry but maybe someone else knows this one.

    Good luck to you hope it works out for you!!

  • Paul Lagmark 65 posts 140 karma points
    May 16, 2016 @ 11:32
    Paul Lagmark
    0

    Yeah, all guides I have found does it like I do, but still no success..

    When I found a solution I will post it here for future reference.

    Thanks for your time! :)

  • Reece Zimm 1 post 71 karma points
    Aug 29, 2016 @ 18:51
    Reece Zimm
    0

    Hey Paul,

    I was running into the same issue. Nothing seemed to work even after following docs line for line I was unable to get the buttons to show up after checking them on the Date types page. My issue was the grid the RTE was in "Grid Default" has its own subset of RTE permissions that will need to be checked as well.

    TIL: Check the grids RTE permissions

    Hope this helps,

    Reece

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    May 16, 2016 @ 13:50
    Dennis Adolfi
    0

    Sounds perfect Paul! Interested to hear more about this since it sounds like a nice configuration.

    All the best!!

Please Sign in or register to post replies

Write your reply to:

Draft