Variable LEXICAL_V4_SCHEMAConst
LEXICAL_V4_SCHEMA: Readonly<
{
type: "object";
title: "LexicalState";
description: "A serialized Lexical rich-text editor state.";
"x-suluk-widget": "richtext";
properties: {
root: {
type: string;
properties: {
type: { const: string };
children: { type: string; items: { $ref: string } };
direction: { type: string[]; enum: (string | null)[] };
format: { type: string[] };
indent: { type: string };
version: { type: string };
};
required: string[];
};
};
required: string[];
$defs: {
lexicalNode: {
type: string;
properties: {
type: { type: string };
version: { type: string };
children: { type: string; items: { $ref: string } };
text: { type: string };
format: { type: string[] };
};
required: string[];
};
};
},
> = ...
The v4 (JSON Schema 2020-12) projection of a Lexical state — recursive via a
$defs.lexicalNodeself-$ref. Drop it onto a property (or$refit from components) to declare a richtext field in a contract. Frozen.