Skip to content

YouTube Videos

Inserting a YouTube Video in a News Article

Section titled “Inserting a YouTube Video in a News Article”

EnaCast allows you to insert YouTube videos inside the body of a news article using a shortcode. This lets you enrich informational content with external audiovisual material.

When you watch a video on YouTube, its URL has a format like the following: https://www.youtube.com/watch?v=ApNQX6fVWQ4

alt text

The video ID is the part that appears after v= In this case, the ID is: ApNQX6fVWQ4

Write the Shortcode in the News Article Body

Section titled “Write the Shortcode in the News Article Body”

To insert the video in the news article, simply write the following shortcode in the news editor, at the exact location where you want the video to appear, with the video ID:

[youtube v=ApNQX6fVWQ4]

In the management panel at studio.enacast.com (Content → News) you can also do it without typing the code: click the YouTube button in the text editor’s toolbar, paste the video’s address or ID into YouTube URL or ID and click Insert Video. The dialog is explained below.

Once the shortcode has been added, save or publish the news article as you normally would. The system will automatically display the video player within the body of the news article.

alt text

ℹ️ You can insert multiple videos in the same news article by repeating the process with different IDs.

⚠️ Make sure the ID is correct: if there is an error, the video will not be displayed.

Under the YouTube button of the editor toolbar, the “Insert YouTube Video” dialog has the checkbox “Use the video cover as the main image” (unticked by default).

  • Unticked: the video is inserted in the article body and the main image does not change.
  • Ticked: in addition, the video cover becomes the article’s main image (replacing any previous one) and is shown with a play icon. Under the image you see “YouTube video cover”, with the start second if you set one, and the “Unlink video” button.

On the website the article opens with that cover. Clicking it opens the video in a window on the same page, starting at the second you set; closing the window stops the video. In news lists the image also carries the play icon.

ℹ️ If you later upload another main image or pick one from the library, the article is no longer a video cover. “Unlink video” keeps the image as a normal image.