你想看看类型插件
The types enables node types - each node can have a type, and you can define
rules on how that type should behave - maximum children count, maximum depth,
valid children types, selectable or not, etc.
Run Code Online (Sandbox Code Playgroud)