Skip to content

Example of Insert Media in ASP.NET MVC Rich Text Editor Control

This sample demonstrates the option to insert media into the Rich Text Editor content. Click the audio and video button from the toolbar item to insert the media.

Video tools are used to insert a video into the Rich Text Editor, from an http or https address or one on this site; click on the video to customize it using the quick toolbar. The quick toolbar has the following items:

  • Replace – can replace the video with some other video.
  • Align – Align the video with left, center and right (the video gets a paragraph of its own).
  • Delete – delete the video.
  • LayoutOption – display the video inline, or with a break (in a paragraph of its own).
  • Resize – can resize the video width (VideoDimension).

Audio tools are used to insert an audio into the Rich Text Editor; click on the audio to customize it using the quick toolbar. The quick toolbar has the following items:

  • Replace – can replace the audio with some other audio.
  • Delete – delete the audio.
  • Display – display the audio inline, or with a break.

The player has the browser’s controls; the HTML keeps only the address, the controls and the width, never a script or an embedded page. The browser’s audio controls take every click, so click the empty part of the audio’s paragraph, or press Tab to the player and Alt+F10 to move into its toolbar.

Note: For security reasons, an embedded video address (a page that plays it) is not taken: insert the address of the media file. The sample plays a video file (.webm) and an audio file (.wav) of this site.