Hi Oskar!
There is no built in way to do this (at least not that I am aware of) but using IDynamicConfigurationsOptions sounds like a way to solve this. You could assign a custom setting to the editor in the GetConfigurationOptions method:
public IDictionary<string, object> GetConfigurationOptions()
{
Dictionary<string, object> customSettings = new Dictionary<string, object>();
customSettings.Add("activate_my_custom_plugin", CustomHasCaccessMethod());
return customSettings;
}
Then you probably should be able to access this setting in your plug-in and skipp adding the command and buttons when initializing the plug-in. You can access the custom setting like this:
ed.getParam("activate_my_custom_plugin")
Hi Oskar and Linus,
I'm also trying to add role access to functions or set a TinyMCE template by checking which group the editor belongs to. Did you manage to solve this?
The support to define and customize property settings in code was launched a few weeks back:
http://world.episerver.com/blogs/Linus-Ekstrom/Dates/2014/10/typed-property-settings/
Sorry, did not see the forum this thread was in. No, this functionality, as well as all new functionality, is released with the latest release meaning that you have to update to EPiServer 7.5+ to get hold of it. If you want to get hold of new functionality, you need to upgrade your solution.
Okey, thanks, I will try to do it by using IDynamicConfigurationsOptions.
Hi
I´m trying to add the html(code) button to the editor by checking if the editor belongs to a certain role but I can´t figure out how to do it.
Can anyone point me in the right direction, I have tried by inheriting from IDynamicConfigurationsOptions with no luck at all.
Best regards
Oskar