Skip to main content

$cloneWithPropertiesEphemeral

function

Returns a clone with $cloneWithProperties and then "detaches" it from the state by overriding its getLatest and getWritable to always return this. This node can not be added to an EditorState or become the parent, child, or sibling of another node. It is primarily only useful for making in-place temporary modifications to a TextNode when serializing a partial slice. Does not mutate the EditorState.

function $cloneWithPropertiesEphemeral<T extends LexicalNode>(latestNode: T): T

Import

import { $cloneWithPropertiesEphemeral } from '@modular/sdk/editor';

Notes

returns
The clone of the node.