Try our conversational search powered by Generative AI!

Role access to functions in TinyMCE Editor

Vote:
 

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

#68213
Mar 19, 2013 9:35
Vote:
 

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")

#77871
Nov 27, 2013 15:49
Vote:
 

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?

#113365
Nov 19, 2014 11:51
Vote:
 

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/

#113366
Nov 19, 2014 11:53
Vote:
 

Thanks, great :)

@Linus: is this for CMS 6 R2? 

#113372
Nov 19, 2014 12:46
Vote:
 

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.

#113373
Nov 19, 2014 12:48
Vote:
 

Okey, thanks, I will try to do it by using IDynamicConfigurationsOptions.

#113374
Nov 19, 2014 12:56
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.