Templating the Key Text field

The Key Text field allows content writers to enter a plain string.

Before Reading

This page assumes that you have already included the @prismicio/vue plugin in your project or that you are using the Prismic Vue.js starter. Check out the Integrating with existing project page to learn how to get setup.


Here's an example of how to integrate a Key Text field into your template.
In this example, the Key Text field has the API ID of key_text.

    <p>{{ fields.keyText }}</p>

export default {
  data () {
    return {
      fields: {
        keyText: null
  methods: {
    // This is an example query, the important part is above.
    getContent () {
        .then((document) => {
          this.fields.keyText = document.data.key_text;
  created () {