gg-editor
Version:
A visual graph editor based on G6 and React
34 lines (24 loc) • 1.09 kB
Markdown
# RegisterNode
To register a node.
## Usage
> G6 [Custom Shape (Chinese)](https://antv.alipay.com/zh-cn/g6/1.x/tutorial/custom-shape.html) Tutorial
```jsx
import GGEditor, { Flow, RegisterNode } from 'gg-editor';
<GGEditor>
<Flow />
<RegisterNode name={...} config={...} extend={...} />
</GGEditor>
```
## API
| Property | Description | Type | Default |
| :--- | :--- | :--- | :--- |
| name | The name of a node. | `string` | - |
| config | To configurate a node. | `object` | - |
| extend | To extend a shape. | `string` | - |
## Built-in Nodes
| Node Name | Preview | Applicable Page |
| :--- | :--- | :--- |
| flow-circle |  | Flow |
| flow-rect |  | Flow |
| flow-rhombus |  | Flow |
| flow-capsule |  | Flow |