jwplayer和tinymce [英] jwplayer and tinymce

查看:95
本文介绍了jwplayer和tinymce的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想让jw播放器与tinymce一起很好地玩.当前,tinymce只是剥离嵌入代码,或将其转换为...从而将其破坏.

I would like to get jw player to play nicely with tinymce. Currently, tinymce just strips the embed code out, or converts it to ... which breaks it.

第一个目标是甚至允许jw播放器代码

first aim is to even allow the jw player code

一个不错的按钮是通过界面添加代码的按钮.

a nice-to-have would be a button to add the code through the interface.

非常感谢任何帮助

推荐答案

以下是在TinyMCE中插入视频以在JW Player中播放的方法.您需要将Media插件添加到TinyMCE编辑器中,并安装ImageManager加载项.

Here's how you can insert video to play in the JW Player in TinyMCE. You need to have the Media plugin added to the TinyMCE editor the ImageManager add-on installed.

编辑/tiny_mce/plugins/media/langs/en_dlg.js:

Edit /tiny_mce/plugins/media/langs/en_dlg.js:

在第一行插入后的任意位置:

Anywhere after the first line insert:

allowfullscreen:允许全屏",

allowfullscreen:"Allow Full Screen",

编辑/tiny_mce/plugins/media/media.htm:

Edit /tiny_mce/plugins/media/media.htm:

立即在第216行之后(包含将行添加菜单"和实时连接"复选框到插入媒体"对话框的高级"部分的行结束)

Immediately after line 216 (contains the that ends the row that adds the Menu and Live Connect checkboxes to the Advanced section of the Insert Media dialog) insert:

{#media_dlg.allowfullscreen}

{#media_dlg.allowfullscreen}

编辑/tiny_mce/plugins/media/js/media.js:

Edit /tiny_mce/plugins/media/js/media.js:

第73行之后:

setBool(pl,'flash','swliveconnect');

setBool(pl, 'flash', 'swliveconnect');

插入:

setBool(pl,'flash','allowfullscreen');

setBool(pl, 'flash', 'allowfullscreen');

在第307行之后插入(仅在使用用于检测YouTube网址的代码之前):

After line 307 insert (Just before the code that detects a URL for YouTube has been used):

if (v.match(/(.+)(.*)\.flv/) || v.match(/(.+)(.*)\.mp4/)) {
    f.width.value = '328';
    f.height.value = '200';
    f.src.value = '/mediaplayer/player.swf?file=' + v;
    return 'flash';
}

(将'/mediaplayer/player.swf'更改为jw播放器swf文件的位置和名称).

(change '/mediaplayer/player.swf' to the location and name of your jw player swf file).

第382行之后:

s + = getBool('flash','swliveconnect',false);

s += getBool('flash', 'swliveconnect', false);

插入:

s + = getBool('flash','allowfullscreen',false);

s += getBool('flash', 'allowfullscreen', false);

编辑ImageManager配置文件以允许上传flv和mp4文件.

Edit the ImageManager config file to allow upload of flv and mp4 files.

要插入视频,请在TinyMCE编辑器工具栏中单击插入媒体"按钮.将其设置为Flash,然后浏览文件.这将打开ImageManager.上载视频文件,或者如果已经将其上载到ImageManager,则选择该文件.文件的URL将插入到媒体"对话框的"URL"字段中.这将提供视频的预览.您可以根据自己的喜好更改大小.单击插入"按钮,然后将插入Flash占位符.

To insert a video, click the Insert Media button in the TinyMCE Editor Toolbar. Leave it set to Flash and Browse for the file. This will open the ImageManager. Upload the video file or select the file if it has already been uploaded to your ImageManager. The URL to the file will be inserted into the URL field of the Media dialog. This will give a preview of the video. You can change the size here is you like. Click the Insert button and a Flash Placeholder is inserted.

这篇关于jwplayer和tinymce的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆