Comment #⁨1⁩

Toby Toby Waterhole Founder Oct 27, 2024

Hey @Tyler DuPont, while Waterhole will automatically embed .mp4 links, unfortunately embedding a YouTube video isn't as simple as appending the .mp4 extension to the URL.

However there is a TextFormatter plugin that can automatically embed YouTube videos (among other things). Take a look at Waterhole's Formatter documentation to learn how to configure the formatter, and the TextFormatter MediaEmbed plugin. The code will end up looking something like this:

use Waterhole\Extend;
use s9e\TextFormatter\Configurator;

Extend\Formatter::configure(function (Configurator $configurator) {
    $configurator->MediaEmbed->add('youtube');
});