【发布时间】:2020-06-05 17:12:51
【问题描述】:
如何在 KeystoneJS 中使用Content field type?按照上面链接中给出的示例,我在 index.js 中添加了以下内容:
keystone.createList('Todo', {
schemaDoc: 'A list of things which need to be done',
fields: {
name: {type: Text, schemaDoc: 'This is the thing you need to do'},
blip: {type: Text, schemaDoc: 'This is another thing'},
status: {type: Select, options: 'pending, processed'},
rating: { type: Stars, starCount: 5 }, body: {
type: Content,
blocks: [
Content.blocks.blockquote,
Content.blocks.image,
Content.blocks.link,
Content.blocks.orderedList,
Content.blocks.unorderedList,
Content.blocks.heading,
// CloudinaryImage.blocks.image,
],
},
},
但是当我转到前端并单击那里的“+”按钮时,它只为我提供了插入图像的选项(见下面的截图)
我应该看到什么?如果我应该看到更多,我应该做什么?我没有看到任何关于“blockquote”、“link”、“orderedList”等的信息......
【问题讨论】:
标签: keystonejs