Home > @uniformdev/mesh-sdk-react > VariableNode
VariableNode class
Renders a variable reference node within a Lexical editor
Signature:
Extends: DecoratorNode<ReactNode>
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new instance of the |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
Readonly<string> |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
| ||
|
Creates the DOM wrapper that hosts the node | ||
|
Render the variable node using React. NOTE: this is effectively an island of React, and you may not call hooks, rely on Context, etc in this renderer. | ||
|
Serializes the node to JSON for editor initial state | ||
|
Gets the node's current state | ||
|
Copy variable to clipboard in a format we will read back if pasted (albeit it won't get the fancy chip-node) | ||
|
| ||
|
| ||
|
|
Imports the node from serialized JSON (i.e. the data provided to the editor's initial state) | |
|
Updates the node's variables state so it knows its current validity, display name, etc The plugin updates this whenever the variables prop changes. | ||