Skip to content

1.5. Configuring content element meta

Luka Bebic edited this page Nov 5, 2020 · 4 revisions

Introduction

Configurable inputs may be added to a content element by specifying the content element type inside the tesMeta array (inside the scheme) and then adding the configurable inputs in the element's meta array.

Code example

elementMeta: [{
  type: 'VIDEO',
  inputs: [{
    key: 'transcript',
    type: 'TEXTAREA',
    label: 'Transcript',
    placeholder: 'Click to add...',
  }, {
    key: 'caption',
    type: 'FILE',
    label: 'Caption',
    placeholder: 'Click to upload text file',
    validate: {
      rules: {
        ext: ['txt']
      }
    }
  }]
}