3

How does one use the Content field type in KeystoneJS? I've put the following in my index.js, following the example given in the link above:

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,
            ],
        },
    },

But when I go to the front end and click on the '+' button there, it only offers me the option of inserting an image (see screenshot below)

What is it I'm supposed to be seeing? If I'm supposed to see more, what am I supposed to be doing? I don't see anything about 'blockquote', 'link', 'orderedList', etc....

Is this all superceded by the Wysiwyg editor? Or do they do different things? enter image description here

Cerulean
  • 5,543
  • 9
  • 59
  • 111

1 Answers1

4

you have to write some text and then select that text for text formatting items.

this is how it looks with all options on:

enter image description here

this is how it looks when I remove the extra formatting option (bare content field) enter image description here

Gautam Singh
  • 1,028
  • 1
  • 9
  • 13