Many video sharing websites now provide iframe code for videos by default. It is usually still possible to get the old embed code although, for example on YouTube, you can do this by checking the Use old embed code
option. Both iframes and old embed code can be pasted directly into the rich text editor.
To embed a video from YouTube, click Share
Copy the contents of the textfield and paste it directly into the editor without switching to source view. The rich text editor automatically detects that this is an iframe and will insert an iframe object in the editor. If the old embed code is used instead, the editor will automatically detect that this is a flash video and a flash object will be inserted in the editor. Once the page is saved, the video contents can be viewed within the page.
If you are inserting an example of the video markup, it is important that you paste it directly as it appears in the video sharing website. Do not add any newlines, spacing, and so on; otherwise the automatic detection feature in the editor might not get triggered. Examples of video markup that will be automatically detected are:
<iframe width="420" height="315" src="http://www.youtube.com/embed/-mcbsrAXlAg" frameborder="0" allowfullscreen></iframe>
<object width="420" height="315"><param name="movie" value="http://www.youtube.com/v/-mcbsrAXlAg?version=3&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-mcbsrAXlAg?version=3&hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>
If you try to paste video content into the rich text editor and it is not automatically converted into a flash video or iframe, try pasting the video sample into Notepad or some other plain text editor, and then copy it from there into the rich text editor. All samples pasted directly from the Share feature in YouTube, Vimeo, and such will work as is.