chore: passing pg

This commit is contained in:
James
2024-04-03 10:39:38 -04:00
parent 25d475e165
commit f6bc3eb014
7 changed files with 17 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
import type { CollectionConfig } from 'payload/types'
import type { BlockField } from 'payload/types'
import { lexicalEditor } from '@payloadcms/richtext-lexical'
import { slateEditor } from '@payloadcms/richtext-slate'
import { blockFieldsSlug, textFieldsSlug } from '../../slugs.js'
import { AddCustomBlocks } from './components/AddCustomBlocks/index.js'
@@ -22,7 +22,7 @@ export const getBlocksField = (prefix?: string): BlockField => ({
{
name: 'richText',
type: 'richText',
editor: lexicalEditor({}),
editor: slateEditor({}),
},
],
},

View File

@@ -5,36 +5,11 @@ export const getBlocksFieldSeedData = (prefix?: string): any => [
blockName: 'First block',
blockType: prefix ? `${prefix}Content` : 'content',
text: 'first block',
richText: {
root: {
type: 'root',
format: '',
indent: 0,
version: 1,
children: [
{
children: [
{
detail: 0,
format: 0,
mode: 'normal',
style: '',
text: '',
type: 'text',
version: 1,
},
],
direction: 'ltr',
format: '',
indent: 0,
type: 'paragraph',
version: 1,
},
],
direction: 'ltr',
richText: [
{
children: [{ text: '' }],
},
},
],
},
{
blockName: 'Second block',