Mindmap custom shape autoresize

Can you give me a hint, please? I want to make a custom shape in mindmap, but I need to repeat the behavior of the default shape - change the text directly in the shape and change the height of the shape automatically depending on the amount of text. How can this be realized? Can you tell me how it is done in the default shape?

Unfortunately it is not available to use the custom shapes in the mindmap diagram.