Any way to hide/remove the built in rich text widget?

2025/05/16 2:14 PM

I dont want the built in XbyK rich text widget appearing in the widget list, How can I hide it?


Environment

Tags:
Page Builder

Answers

2025/05/16 2:23 PM

We do this on all our projects, create a helper:

public static class WidgetRestrictionHelper
{
    private static readonly string[] ExcludedWidgets =
    {
        SystemComponentIdentifiers.RICH_TEXT_WIDGET_IDENTIFIER,
        SystemComponentIdentifiers.FORM_WIDGET_IDENTIFIER,
    };

    public static IEnumerable<string> GetAllWidgetsIdentifiers()
    {
        return new ComponentDefinitionProvider<Kentico.PageBuilder.Web.Mvc.WidgetDefinition>()
               .GetAll()
               .Select(definition => definition.Identifier)
               .Where(identifier => !ExcludedWidgets.Contains(identifier));
    }
}

Then in your views:

<editable-area area-identifier="widgets" area-options-allowed-widgets="@WidgetRestrictionHelper.GetAllWidgetsIdentifiers()" />
2025/05/16 2:27 PM

Thanks Liam! Thats an option. Any way to just do it by overriding built in settings so I can avoid updating my sections?

2025/05/16 2:43 PM

Not that I know of unfortunately, I think this is something we should be flagging in the roadmap as a suggestion. I'm pretty sure I've already submitted it, but I will submit it again now, and I recommend you do too!

It might be a small enough improvement they can slip it into an upcoming refresh? 🤞

2025/05/16 4:12 PM

There's a full Community Portal blog post on this topic - Defining Editable Area Restrictions.

But, Liam is correct. Widgets, Sections, and Page Templates are opt-out - even your own - through filters or restrictions. That's because they are globally registered with the [assembly: ] attributes.

Not surprisingly there's an example of limiting which widgets are available in a Page Template in the Kentico Community Portal, which restricts the built-in Rich Text Widget from being available for blog posts.

To answer this question, you have to login first.