Any idea why I get this error:
Collection "posts" > Field "content" > "value" does not match any of the allowed types
When adding this block to a block field in a collection:
import { Block } from "payload/types";
const CodeBlock: Block = {
slug: "Code",
fields: [
{
name: "content",
type: "code",
required: true,
admin: { editorOptions: { minimap: false } },
},
],
};
export default CodeBlock;
Can we check out the posts collection defenition too?
Hey @toolreaz - were you able to figure out what was happening here? Would love to get to the bottom of this 👍
Hi @patrikkozak , it looks like it's the editorOptions which is causing the error even if its empty> Removing it solves the issue
And btw I did a misstake in my example, it should be
admin: { editorOptions: { minimap: { enabled: false } } },
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.