Copied to clipboard

Flag this post as spam?

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


  • Eran Meir 401 posts 543 karma points
    Mar 31, 2014 @ 17:14
    Eran Meir
    0

    TinyMCE and forecolor (text color picker)

    has anyone succeded implementing forecolor command to tinymce in umbraco 7?

  • Anders Schmidt 76 posts 207 karma points
    Apr 03, 2014 @ 11:08
    Anders Schmidt
    0

    I would be glad to hear if anyone has achieved this. 

    I have tried using:

        <command>

         <umbracoAlias>mceForeColor</umbracoAlias>

          <icon>images/editor/forecolor.gif</icon>

          <tinyMceCommand value="" userInterface="true" frontendCommand="forecolor">forecolor</tinyMceCommand>

          <priority>76</priority>

        </command>

    inside tinyMceConfig.config and touched webconfig. But no luck...

    Thanks

      

  • René Nissen 15 posts 96 karma points
    Apr 23, 2014 @ 13:56
    René Nissen
    108

    Add this to the <plugins> section and you will be able to use the forecolor and backcolor commands

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

  • Eran Meir 401 posts 543 karma points
    Apr 23, 2014 @ 17:11
    Eran Meir
    0

    thank you René!

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Nov 07, 2014 @ 16:19
    Dave Woestenborghs
    1

    I got it working too. But is it possible to define your own colors or let the editor choose a non predefined value ?

    Dave

  • Clickfarm 77 posts 161 karma points
    Jan 15, 2015 @ 22:42
    Clickfarm
    0

    Hi, I'm in the same boat as Dave. I was able to get the color picker working but it does not allow for the user to select a custom color.

    The example color picker on the TinyMCE website shows that you should be able to set a custom color http://www.tinymce.com/tryit/full.php

    Can someone please explain what additional configuration needs to happen to enable that part of the color picker?

     

    Thanks,

    Matt

  • Clickfarm 77 posts 161 karma points
    Jan 15, 2015 @ 23:23
    Clickfarm
    0

    Update, i figured out that the TinyMCE version umbraco is using doesn't have the custom color picker.  I was able to get it to work by upgrading to the latest version which adds the colorpicker plugin. Also add the following to the tinymce config. 

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

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Jan 16, 2015 @ 09:56
    Dave Woestenborghs
    0

    Hi Matt,

    Can you describe how you did the update of tinyMce ?

     

    Dave

  • Clickfarm 77 posts 161 karma points
    Jan 16, 2015 @ 16:34
    Clickfarm
    2
    1. download latest TinyMCE http://download.moxiecode.com/tinymce/tinymce_4.1.7.zip
    2. copy contents into /umbraco/lib/tinymce
    3. add the following to the /config/tinyMceConfig.config
      1. <plugin loadOnFrontend="true">textcolor</plugin>
      2. <plugin loadOnFrontend="true">colorpicker</plugin>
      3. <command><umbracoAlias>mceForeColor</umbracoAlias><icon>images/editor/forecolor.gif</icon><tinyMceCommand value="" userInterface="true" frontendCommand="forecolor">forecolor</tinyMceCommand><priority>75</priority></command>
    4. umbraco's tinymce skin doesn't work with the color picker so you also have to replace the contents located at /umbraco/lib/tinymce/skins/umbraco with the files from /umbraco/lib/tinymce/skins/lightgray
  • Matthew Kirschner 323 posts 611 karma points
    Jan 23, 2015 @ 19:01
    Matthew Kirschner
    0

    Its great that you were able to update the tinyMCE editor in Umbraco, but mucking about with the internal Umbraco files kinda skeeves me out. Does anyone know of a downside to doing this?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 23, 2015 @ 19:07
    Jan Skovgaard
    0

    Hi Matthew

    One downside is that if you should come to a point where you need to upgrade the Umbraco installation then you would need to overwrite the tinymce source again in order for the changes to work. But it's no guarantee it will work since the integration with tinymce could have been changed between versions for instance.

    There are probably more things to consider but this is the first thing that comes to mind for me :)

    /Jan

  • Matthew Kirschner 323 posts 611 karma points
    Jan 23, 2015 @ 19:18
    Matthew Kirschner
    0

    Thanks, Jan. I though of the upgrade issue as well. It would be annoying to have to re-do the tinyMCE update after every Umbraco update. Forunately, the tinyMCE update seems rather minimal and could easily be overwritten if something goes wrong.My main concern is if there is any risk of data corruption by using a more modern version of tinyMCE.

    I know that upgrading tinyMCE is a focus for the Umbraco team now, but if I can safely update it myself I would be very happy.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jan 23, 2015 @ 19:21
    Jan Skovgaard
    0

    Hi Matthew

    Well I don't think that it would be an issue to update it yourself actually.

    But I can't guarantee that it just works without any quirks...but if you're using version control you could perhaps make an upgrade branch for tinymce where you can test it properly before merging it back into your master?

    /Jan

  • Gísli Freyr Svavarsson 43 posts 126 karma points
    Dec 31, 2015 @ 11:19
    Gísli Freyr Svavarsson
    0

    Hi, If anyone is here to try and find out how to add custom colors to the Text Color picker. You change them here \umbraco\lib\tinymce\plugins\textcolor\plugin.min.js.

    In a function called n there's a list of colors that you can customize.

  • Scott 95 posts 277 karma points
    Aug 04, 2016 @ 12:17
    Scott
    1

    Actually if you add this key to the customConfig section in tinyMceConfig.config then you can control all the colors just as you wish :)

    <config key="textcolor_map">
    [
            "000000", "Black",
            "993300", "Burnt orange",
            "333300", "Dark olive",
            "003300", "Dark green",
            "003366", "Dark azure",
            "000080", "Navy Blue",
            "333399", "Indigo",
            "333333", "Very dark gray",
            "800000", "Maroon",
            "FF6600", "Orange",
            "808000", "Olive",
            "008000", "Green",
            "008080", "Teal",
            "0000FF", "Blue",
            "666699", "Grayish blue",
            "808080", "Gray",
            "FF0000", "Red",
            "FF9900", "Amber",
            "99CC00", "Yellow green",
            "339966", "Sea green",
            "33CCCC", "Turquoise",
            "3366FF", "Royal blue",
            "800080", "Purple",
            "999999", "Medium gray",
            "FF00FF", "Magenta",
            "FFCC00", "Gold",
            "FFFF00", "Yellow",
            "00FF00", "Lime",
            "00FFFF", "Aqua",
            "00CCFF", "Sky blue",
            "993366", "Red violet",
            "FFFFFF", "White",
            "FF99CC", "Pink",
            "FFCC99", "Peach",
            "FFFF99", "Light yellow",
            "CCFFCC", "Pale green",
            "CCFFFF", "Pale cyan",
            "99CCFF", "Light sky blue",
            "CC99FF", "Plum"
        ]
    </config>
    

    Kind regards

    Scott

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Dec 17, 2020 @ 10:20
    Bjarne Fyrstenborg
    1

    Anyone who know if this should still work on Umbraco v8?

    Working with Umbraco 8.9 I can enable the text color plugin adding the following to tinyMceConfig.config:

    Inside <commands> element:

    <command alias="forecolor" name="Text color" mode="Selection" />
    

    Inside <plugins> element:

    <plugin>textcolor</plugin>
    

    This show the default color palette picker:

    enter image description here

    However it seems it previous by default also showed a "More Colors" option:

    https://blunderings.wordpress.com/2012/02/21/using-the-tinymce-color-picker-in-umbraco/

    I tried added the following to <customConfig>, but it doesn't seem to have any effect:

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

    I also tried with the suggested config here, but doesn't seem to have any effect either:

    <config key="textcolor_map">
        [
            "000000", "Black",
            "993300", "Burnt orange",
            "333300", "Dark olive",
            "003300", "Dark green",
            "003366", "Dark azure",
            "000080", "Navy Blue",
            "333399", "Indigo",
            "333333", "Very dark gray",
            "800000", "Maroon",
            "FF6600", "Orange",
            "808000", "Olive",
            "008000", "Green",
            "008080", "Teal",
            "0000FF", "Blue",
            "666699", "Grayish blue",
            "808080", "Gray",
            "FF0000", "Red",
            "FF9900", "Amber",
            "99CC00", "Yellow green",
            "339966", "Sea green",
            "33CCCC", "Turquoise",
            "3366FF", "Royal blue",
            "800080", "Purple",
            "999999", "Medium gray",
            "FF00FF", "Magenta",
            "FFCC00", "Gold",
            "FFFF00", "Yellow",
            "00FF00", "Lime",
            "00FFFF", "Aqua",
            "00CCFF", "Sky blue",
            "993366", "Red violet",
            "FFFFFF", "White",
            "FF99CC", "Pink",
            "FFCC99", "Peach",
            "FFFF99", "Light yellow",
            "CCFFCC", "Pale green",
            "CCFFFF", "Pale cyan",
            "99CCFF", "Light sky blue",
            "CC99FF", "Plum"
        ]
    </config>
    
  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Dec 17, 2020 @ 10:52
    Bjarne Fyrstenborg
    0

    Okay, it actually does work using textcolor_map config, I just didn't notice a difference because the configuration is the default colors 🙈 https://www.tiny.cloud/docs-4x/plugins/textcolor/

    It is possible to define a limited set of colors and/or enable the colorpicker plugin which allow specifying a custom color. https://www.tiny.cloud/docs-4x/plugins/colorpicker/

    <plugin>textcolor</plugin>
    <plugin>colorpicker</plugin>
    
Please Sign in or register to post replies

Write your reply to:

Draft