hennessyevan / netlify-cms-widget-youtube

Youtube Widget for Netlify CMS
MIT License
27 stars 8 forks source link

No control for widget 'youtube'. #2

Closed andrevandal closed 4 years ago

andrevandal commented 5 years ago

Actual Behavior

The widget doesn't load.

image

index.js

import CMS from 'netlify-cms'
import { youtubeControl, youtubePreview } from 'netlify-cms-widget-youtube'
CMS.registerWidget('youtube', youtubeControl, youtubePreview)

I tried import youtube from 'netlify-cms-widget-youtube' too

config.yml

      - label: "Galeria: Vídeos"
        name: "videos-gallery"
        file: "content/gallery/videos.yml"
        fields:
          - label: "Vídeo"
            name: "videos"
            widget: "list"
            fields:
            - { name: video, label: Vídeo, widget: youtube, extraInfo: true, APIkey: "" }

Specifications

juanbrujo commented 4 years ago

in the Fields object you need the quotes:

fields:
  - { name: "video", label: "Vídeo", widget: "youtube", extraInfo: true, APIkey: "" }