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.
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
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?
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 :)
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.
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?
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.
TinyMCE and forecolor (text color picker)
has anyone succeded implementing forecolor command to tinymce in umbraco 7?
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
Add this to the <plugins> section and you will be able to use the forecolor and backcolor commands
<plugin loadOnFrontend="true">textcolor</plugin>
thank you René!
I got it working too. But is it possible to define your own colors or let the editor choose a non predefined value ?
Dave
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
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>
Hi Matt,
Can you describe how you did the update of tinyMce ?
Dave
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?
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
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.
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
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.
Actually if you add this key to the customConfig section in tinyMceConfig.config then you can control all the colors just as you wish :)
Kind regards
Scott
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:Inside
<plugins>
element:This show the default color palette picker:
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:I also tried with the suggested config here, but doesn't seem to have any effect either:
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/is working on a reply...