Home > @uniformdev/mesh-sdk-react > VariableNode
VariableNode class
Renders a variable reference node within a Lexical editor
Signature:
Extends: DecoratorNode<JSX.Element>
Constructors
<table><thead><tr><th>
Constructor
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead> <tbody><tr><td>
(constructor)(reference, state, key)
</td><td>
</td><td>
Constructs a new instance of the VariableNode
class
</td></tr> </tbody></table>
Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead> <tbody><tr><td>
</td><td>
</td><td>
Readonly<string>
</td><td>
</td></tr> </tbody></table>
Methods
<table><thead><tr><th>
Method
</th><th>
Modifiers
</th><th>
Description
</th></tr></thead> <tbody><tr><td>
</td><td>
static
</td><td>
</td></tr> <tr><td>
</td><td>
</td><td>
Creates the DOM wrapper that hosts the node
</td></tr> <tr><td>
</td><td>
</td><td>
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.
</td></tr> <tr><td>
</td><td>
</td><td>
Serializes the node to JSON for editor initial state
</td></tr> <tr><td>
</td><td>
</td><td>
Gets the node's current state
</td></tr> <tr><td>
</td><td>
</td><td>
Copy variable to clipboard in a format we will read back if pasted (albeit it won't get the fancy chip-node)
</td></tr> <tr><td>
</td><td>
static
</td><td>
</td></tr> <tr><td>
</td><td>
static
</td><td>
Imports the node from serialized JSON (i.e. the data provided to the editor's initial state)
</td></tr> <tr><td>
</td><td>
</td><td>
Updates the node's variables state so it knows its current validity, display name, etc The plugin updates this whenever the variables prop changes.
</td></tr> <tr><td>
</td><td>
</td><td>
</td></tr> </tbody></table>