Problems with using rich text field

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets):

I’m developing a custom code component, and in the schema, I have a field of type object, which contains another (nested) field of type richText. However, a couple of bugs make it hard/impractical to use - described below.

What are the reproduction steps?
Register a custom code component with the following schema:

{
  name: 'custom code component',
  props: {
    slug: 'string',
    content: {
      type: 'object',
      fields: {
        en: {
          type: 'richText'
        }
      }
    },
  },
};

Then, try to edit the nested ‘content’ field for a custom code component to see that:

  • rich text editor is cramped and hard to use
  • selecting a type paragraph/heading/preformatted text closes the editing state and doesn’t change anything in the content itself

Relevant links:

  • My project:

Is it planned to be fixed, or am I missing something in my implementation?

I think you may have found an undocumented prop type that isn’t widely used :slight_smile:

We are unlikely to expand on this feature due to the UX issues you mentioned. I think a better approach may be to replace it with a slot prop instead, so the user can put any kind of UI in there.