0

I want to embed multiple youtube videos on pages and want to give the same option to the content creator. I did see the modules apostrophe-oembed and browser-apostrophe-oembed. Can you provide and example for the same? Thanks!

Parik Tiwari
  • 1,525
  • 1
  • 12
  • 19

3 Answers3

1

With the latest version now in November 2018, all I needed to do was to add 'apostrophe-video': {} into the widgets list for the apos.area on the page. Adding something to the app.js caused the site to break.

MPOCH
  • 21
  • 1
0

I am the lead developer of Apostrophe at P'unk Avenue.

Try apostrophe-video-widgets. Works like adding any other widget to an apos.area or apos.singleton call. There are no required options.

Just as a reminder, when calling apos.area or apos.singleton you just need the name of the widget (apostrophe-video), not the name of the module that happens to provide it (apostrophe-video-widgets).

Tom Boutell
  • 7,281
  • 1
  • 26
  • 23
  • Thanks Tom! I was able to add the video widget and the text box that shows up only allows the addition of http urls and I am trying to add an iframe youtube url. do I need pass a specific parameter? my code looks like – Parik Tiwari Jan 16 '17 at 03:20
  • {{ apos.area(data.piece, 'main', { widgets: { 'apostrophe-rich-text': { toolbar: [ 'Styles', 'Bold', 'Italic', 'Blockquote', 'Link', 'Anchor', 'Unlink', 'Table', 'BulletedList', 'NumberedList' ], }, 'apostrophe-video': { } } }) }} – Parik Tiwari Jan 16 '17 at 03:22
0

The solution that worked for me is:

  1. Add the widget in the app.js file. 'apostrophe-video-widgets': {},
  2. COPY the apostrophe-video-widgets folder from the node_modules folder to the root/lib/modules
Parik Tiwari
  • 1,525
  • 1
  • 12
  • 19