2024-11-03 12:13:36 +00:00
|
|
|
export default interface ContentField
|
|
|
|
extends Array<
|
|
|
|
| {
|
|
|
|
type: "paragraph" | "heading" | "quote";
|
|
|
|
children: Array<TypeField>;
|
|
|
|
level?: number;
|
|
|
|
}
|
|
|
|
| {
|
|
|
|
type: "list";
|
|
|
|
format: "unordered" | "ordered";
|
|
|
|
children: Array<{ type: "list-item"; children: Array<TypeField> }>;
|
|
|
|
}
|
2024-11-06 07:59:07 +00:00
|
|
|
| {
|
|
|
|
type: "code";
|
|
|
|
children: Array<{ type: "list-item"; children: Array<TypeField> }>;
|
|
|
|
language: "plaintext";
|
|
|
|
}
|
2024-11-03 12:13:36 +00:00
|
|
|
> {}
|
|
|
|
|
|
|
|
export type TypeField = TextField | { type: "link"; url: string; children: Array<TextField> };
|
|
|
|
|
|
|
|
export type TextField = {
|
|
|
|
type: "text";
|
|
|
|
text: string;
|
|
|
|
strikethrough?: boolean;
|
|
|
|
underline?: boolean;
|
|
|
|
italic?: boolean;
|
|
|
|
bold?: boolean;
|
|
|
|
};
|