返回介绍

Enhanced Media Embed plugin

发布于 2019-05-06 06:50:33 字数 2558 浏览 1021 评论 0 收藏 0

The Enhanced Media Embed plugin is a premium TinyMCE 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.

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 TinyMCE Cloud. Simply specify the media and mediaembed plugins, and optionally a mediaembed_max_width

tinymce.init({
  selector: "textarea",
  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",
  plugins: "media mediaembed",
  mediaembed_service_url: "SERVICE_URL",
  mediaembed_max_width: 450
});

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.

Configuration Options

mediaembed_service_url

This setting specifies the URL to the service that will handle your requests and return the embeddable snippets used by the Media Embed plugin. Please follow these instructions to configure the WAR file that you will get as a part of your premium TinyMCE plugin subscription. This option is not required for TinyMCE Cloud.

mediaembed_max_width

This optional setting specifies a maximum width in pixels of the embedded content. Defaults to 650.

Downloading Enhanced Media Embed plugin

A premium TinyMCE plugin 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文