New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists

Embedding youtube videos using an EasyMacro

  • Tip Category - Developing Wiki Applications
  • Tip Added By - MichaelDaum - 24 Oct 2011 - 10:52
  • Extensions Used - EasyMacroPlugin
  • Useful To - Beginners
  • Tip Status - New
  • Related Topics -


Instead of copy-pasting html <embed ...> code all over your wiki, here's a simple wiki app that does this all in one place.



Save the below to a topic called SomeWeb.EasyYoutube. Then add this web.topic to the EASYMACROS variable of your Main.SitePreferences.


  %IF{"$SIZE='small' or not defined SIZE" then="width='425' height='344'"}%\
  %IF{"$SIZE='medium'" then="width='480' height='385'"}%\
  %IF{"$SIZE='large'" then="width='640' height='505'"}%\
  %IF{"$SIZE='huge'" then="width='960' height='745'"}%>
  <param name="movie" value="></param>
  <param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param>
  <embed src="" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" \
  %IF{"$SIZE='small'" then="width='425' height='344'"}%\
  %IF{"$SIZE='medium' or not defined SIZE" then="width='480' height='385'"}%\
  %IF{"$SIZE='large'" then="width='640' height='505'"}%\
  %IF{"$SIZE='huge'" then="width='960' height='745'"}%>


  • SIZE: small, medium, large, huge


You type:

You get (if installed):


Known Uses

Known Limitations

See Also

BestPracticeTipsForm edit

Category Developing Wiki Applications
Related Topics
Topic revision: r1 - 24 Oct 2011, MichaelDaum - This page was cached on 20 Sep 2018 - 09:17.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy