HTML Field


The html field represents a chunk of HTML content.

tinacms-markdown-field

Definition

Below is an example of how a html field could be defined. Read more on passing in form field options.

const BlogPostForm = {
  fields: [
    {
      name: 'frontmatter.summary',
      component: 'html',
      label: 'Summary',
    },
    // ...
  ],
}

Options

  • name: The path to some value in the data being edited.
  • label: A human readable label for the field. This label displays in the sidebar and is optional. If no label is provided, the sidebar will default to the name.
  • description: An optional description that expands on the purpose of the field or prompts a specific action.

Interface

interface HtmlConfig {
  name: string
  component: 'html'
  label?: string
  description?: string
}