Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Yep. Luc Gosso put together a blog post explaining how you can limit the available buttons in TinyMCE by user role. You can read it here:
https://devblog.gosso.se/2018/09/customize-tinymce-at-runtime-in-episerver-11/
Hi, it is also possible to use the TinyMCE configuration API: AddSettingsTransform.
For example you could add the "code" button (view HTML source) to the toolbar if the current user is in role "WebAdmins" like this:
config.Default().AddSettingsTransform("sample-add-code-button", (settings, content, propertyName) =>
{
var user = HttpContext.Current?.User;
if (user !=null && user.IsInRole("WebAdmins"))
{
settings.AddPlugin("code");
settings.AppendToolbar("| code");
}
});
Is it possible to configure TinyMCE editor to display options based on user roles?