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
imgtags, as blocks or in line with text. It can also make images resizable with handles. - Audio. Audio embeds audio files as native
audioelements, 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
inlinesetting. 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
addPasteHandlersetting turns this off. - Twitch needs your domain. Set the
parentsetting to the domain that embeds the player, or the embed doesn't display.
Related
- Clipboard and files handles files and content that people paste or drop.
- Text blocks are the paragraphs and headings around your media.