Moodle has built in filters that will replace standard links to YouTube or Vimeo videos with embedded video. You don't have to create a link, just paste the URL into your text.

Please note that this requires standard YouTube links like   not shortened ones like

Wherever it recognises these links in a text editor it will replace them with the embedded video like this: (after the text being edited has been saved).

The same applies to Vimeo links like

Last modified: Thursday, 24 September 2020, 6:13 PM