"I have a dream!" ...a dream to help you add quotes to your Prismic projects for all your writers to use.

The best way to create a quotes element is using slices, by using slices you will be able to add as many quotes as you need to a document while keeping everything consistent.

If you aren't using slices currently, learn more about this feature here.
 

First navigate to your desired custom type

Then go to the 'Slice zone' and create a new slice with the name 'Quote'. In the 'Description' field add some information like 'A quote section'.

Then in this slice's Non-repeatable zone add a Rich Text Field and give the field a name such as ‘Quote’. Make sure to name the API ID ‘quote’. Optionally add a Field placeholder like ‘Post Quote…’. Finally set the default tag as ‘p’.

Alternatively you can add this JSON to the editor:

"quote" : {
  "type" : "Slice",
  "fieldset" : "Quote",
  "description" : "A quote section",
  "icon" : "format_quote",
  "non-repeat" : {
    "quote" : {
      "type" : "StructuredText",
      "config" : {
        "single" : "paragraph",
        "label" : "Quote",
        "placeholder" : "Post Quote..."
      }
    }
  },
  "repeat" : { }
},


Navigate to your content section
Go to a document using this custom type. In this document you simply add the actual quote text.

Then in project files template the quote.

You can template the Rich text quote inside a HTML tag such as <blockquote> and style this as you please. 

Learn more about templating Rich Text and Slices

Use the resources below to learn more. You can also find this information for many other languages in our documentation.

Rich Text templating in Javascript.
Slices templating in Javascript.

Did this answer your question?