Q:How to add a YouTube video using HTML in the page resource content editor?
Q:How to add a YouTube video using HTML in the page resource content editor?
There are three ways to add:
- Embed
- Text link
- URL link
Here are the steps for each.

Preparation time
5 minutes
Difficulty
Easy
Directions
1. Embed
- First, add a page resource.

- Select the desired video and right-click on it to "Copy embed code."

- Enter the page name, and paste the copied embed code in HTML format into the content editor.

- This way, you can add a YouTube video by embedding it.

2. Text link
Administrator Settings
To add YouTube videos via text or URL links, administrators need to disable the "Multimedia plugins" feature.
Path: Site administration > Plugins > Filters > Manage filters> Multimedia plugins, then select "Disabled" from the dropdown menu.

Teacher Settings
Teachers can simply copy the video URL, highlight the text where they want to insert the link, and click "Create link."


Comparison of Multimedia Plugins Enabled and Disabled on Student Interface:
"Disabled" Multimedia Plugins:
- In this scenario, when students click on the linked text "here," it will open a new page and redirect them to YouTube.

"Enabled" Multimedia Plugins:
- With multimedia plugins enabled, the linked content will be directly embedded as a video, allowing students to view it within the Moodle platform.

3. URL link
Teacher Settings
- Highlight the URL and click "Link", and you can navigate to YouTube to watch it through the URL.


Student Interface:
- When students click on the linked URL, it will open a new page and redirect them to YouTube.
