Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 2.86 KB

File metadata and controls

76 lines (51 loc) · 2.86 KB

Enhanced Media Embed plugin

The Enhanced Media Embed plugin is a premium {productname} plugin that will take a URL, send it to a backend service that returns an embeddable snippet of code, and add that code to the editor. That typically takes the form of rich media such as audio, video and social media cards.

Interactive example

liveDemo::mediaembed[]

Installation

For the moment the Enhanced Media Embed plugin has to be used in conjunction with the media plugin, so:

  1. Make sure you have the media plugin added to the plugins list.

  2. Add the mediaembed plugin to the plugins list.

Example Cloud Configuration

The service URL is already configured with {cloudname}. Simply specify the media and mediaembed plugins, and optionally a mediaembed_max_width

tinymce.init({
  selector: 'textarea', // change this value according to your HTML
  plugins: 'media mediaembed',
  mediaembed_max_width: 450
});

Example Self-hosted Configuration

In a Self-hosted installation, please ensure you configure the URL to the service with the mediaembed_service_url parameter.

tinymce.init({
  selector: 'textarea', // change this value according to your HTML
  plugins: 'media mediaembed',
  mediaembed_service_url: 'SERVICE_URL',
  mediaembed_max_width: 450
});

CSS

To make the embeddable snippets display correctly on your site, be sure to add the required summary card CSS.

link:example$css-codeblock/mediaembed-plugin.css[role=include]

Usage

The plugin can be used in two ways, either by simply entering a URL on an empty line and pressing the enter key - or by entering the URL into the media plugin’s dialog window. Either way the URL will be handled by the service backend and the returned code will be embedded into the editor.

Downloading Enhanced Media Embed plugin

A {enterpriseversion} subscription includes the ability to download and install the Media Embed plugin and a WAR file to access the service backend. Please follow these instructions to configure the WAR file.