I will preface this by saying we are using XM Cloud with Nextjs. No C# in sight.

I have a component, basically:

- Content
  - Heading: Single-line Text
  - Body: Richtext

One of our requirements is specifically on the body, that a person can select each paragraph and select whether they have a white background style, or a padded gray background style, as such:

Example of Richtext

I've mocked this up by throwing in some HTML of my own, but we don't really want the content editors to have to do that, we'd prefer them to be able to format it in the editor.

Is it possible to do this with the style menu, as in the image below, but limit that style as available only to the richtext on Block, so that if for example, another component named OtherBlock does not have that in its styles menu?

Style menu

Hope someone can advise.


2 Answers 2


So, wouldn't a specific HTML Editor Profile work for this? You can create the custom profile, point the Rich Text Field of Block specifically to that Editor Profile, and then keep the rest of the RTE's to the default profile.


You can use combination of HTML Editor Profile and HTML snippets to display it for specific components

  • First create HTML snippet like this <p class='bg-gray'>Your Text goes here.</p> and list it in RTE
  • Now Create a custom Editor Profile to display Snippets tool
  • Use this Custom Editor Profile for your Rich Text field in Block component.

Here is a link stating detailed instructions to perform above steps.


This is just a workaround and not a standard practice. Personally, I would rely on Content authors to make wise decision since we are already exposing them HTML.

Hope this helps !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.