Update payload to 2.18.3
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
tobias
2024-05-27 11:24:42 +02:00
parent d62e7d788e
commit f37a1719b7
5 changed files with 2680 additions and 1712 deletions

View File

@ -3,6 +3,7 @@ import { isAdmin } from "@/access/isAdmin";
import { isEditor } from "@/access/isEditor";
import { isSSG } from "@/access/isSSG";
import { isUser } from "@/access/isUser";
import { slateEditor } from '@payloadcms/richtext-slate'
const Posts: CollectionConfig = {
slug: "posts",
@ -68,26 +69,28 @@ const Posts: CollectionConfig = {
required: true,
},
{
name: "content",
type: "richText",
admin: {
elements: ["h2", "h3", "h4", "link", "ol", "ul", "upload", "blockquote", "indent"],
leaves: ["bold", "italic", "underline"],
upload: {
collections: {
media: {
fields: [
{
name: "image",
type: "upload",
relationTo: "media",
required: true,
},
],
name: 'content',
type: 'richText',
editor: slateEditor({
admin: {
elements: ["h2", "h3", "h4", "link", "ol", "ul", "upload", "blockquote", "indent"],
leaves: ["bold", "italic", "underline", "strikethrough"],
upload: {
collections: {
media: {
fields: [
{
name: "image",
type: "upload",
relationTo: "media",
required: true,
},
],
},
},
},
},
},
})
},
{
name: "author",