Merge pull request #5604 from payloadcms/fix/postgres-fields

chore: revisions to baseIDField
This commit is contained in:
James Mikrut
2024-04-03 10:55:43 -04:00
committed by GitHub
8 changed files with 40 additions and 49 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',