StateFieldSpec.toJSON method
StateFieldSpec › toJSON
A function used to serialize this field's content to JSON. Only necessary when this field is included in the argument toEditorState.toJSON.Signature:
toJSON(value: Value, state: EditorState): unknownParameters:
| Parameter | Type | Description |
|---|---|---|
| value | Value | The value to serialize. |
| state | EditorState | The state to serialize the value for. |
Returns: unknown — The serialized value.