Media and embeds

Media extensions put images, audio files, and videos from YouTube and Twitch into a document.

When you use them

  • Images. Image shows images with img tags, as blocks or in line with text. It can also make images resizable with handles.
  • Audio. Audio embeds audio files as native audio elements, with the browser's controls if you want them.
  • Videos. YouTube embeds YouTube videos, and Twitch embeds Twitch videos, clips, and live channels.

How they work

  • They are nodes. Each one adds a node to the document. Image and Audio are blocks by default, and all four have an inline setting. Nodes and marks
  • You add them yourself. None of them is part of the StarterKit.
  • They don't upload files. Image only displays images. To handle files that people drop or paste, use File handler and upload them to your server.
  • Pasting creates an embed. Audio and Twitch handle pasted audio sources and Twitch links by default; the addPasteHandler setting turns this off.
  • Twitch needs your domain. Set the parent setting to the domain that embeds the player, or the embed doesn't display.