Fix ts
This commit is contained in:
parent
de599cfcd7
commit
11ac215611
|
@ -1,7 +1,7 @@
|
|||
import { Block } from "payload/types";
|
||||
import { LexicalBlock } from "@payloadcms/richtext-lexical";
|
||||
import { BreakBlockType } from "../constants";
|
||||
|
||||
export const breakBlock: Block = {
|
||||
export const breakBlock: LexicalBlock = {
|
||||
slug: "breakBlock",
|
||||
interfaceName: "BreakBlock",
|
||||
labels: { singular: "Break", plural: "Breaks" },
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Block } from "payload/types";
|
||||
import { LexicalBlock } from "@payloadcms/richtext-lexical";
|
||||
import { createEditor } from "../utils/editor";
|
||||
import { breakBlock } from "./breakBlock";
|
||||
import { transcriptBlock } from "./transcriptBlock";
|
||||
|
||||
const generateRecursiveSectionBlock = (depth = 1, maxDepth = 5): Block => ({
|
||||
const generateRecursiveSectionBlock = (depth = 1, maxDepth = 5): LexicalBlock => ({
|
||||
slug: "sectionBlock",
|
||||
interfaceName: "SectionBlock",
|
||||
labels: { singular: "Section", plural: "Sections" },
|
||||
|
@ -33,4 +33,4 @@ const generateRecursiveSectionBlock = (depth = 1, maxDepth = 5): Block => ({
|
|||
],
|
||||
});
|
||||
|
||||
export const sectionBlock: Block = generateRecursiveSectionBlock();
|
||||
export const sectionBlock: LexicalBlock = generateRecursiveSectionBlock();
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Block } from "payload/types";
|
||||
import { LexicalBlock } from "@payloadcms/richtext-lexical";
|
||||
import { cueBlock } from "./cueBlock";
|
||||
import { lineBlock } from "./lineBlock";
|
||||
|
||||
export const transcriptBlock: Block = {
|
||||
export const transcriptBlock: LexicalBlock = {
|
||||
slug: "transcriptBlock",
|
||||
interfaceName: "TranscriptBlock",
|
||||
labels: { singular: "Transcript", plural: "Transcripts" },
|
||||
|
|
|
@ -8,6 +8,7 @@ import {
|
|||
HeadingFeature,
|
||||
InlineCodeTextFeature,
|
||||
ItalicTextFeature,
|
||||
LexicalBlock,
|
||||
LinkFeature,
|
||||
// BlockQuoteFeature,
|
||||
OrderedListFeature,
|
||||
|
@ -22,11 +23,11 @@ import {
|
|||
UploadFeature,
|
||||
lexicalEditor,
|
||||
} from "@payloadcms/richtext-lexical";
|
||||
import { Block, RichTextAdapter } from "payload/types";
|
||||
import { RichTextAdapter } from "payload/types";
|
||||
|
||||
interface EditorOptions {
|
||||
debugs: boolean;
|
||||
blocks: Block[];
|
||||
blocks: LexicalBlock[];
|
||||
headings: boolean;
|
||||
lists: boolean;
|
||||
inlines: boolean;
|
||||
|
|
Loading…
Reference in New Issue