django-ckeditor配置html5video上传视频

参考信息

为Django ckeditor配置上传视频:https://www.byincd.com/bobjiang/article-01128/

使用

1. 需要手动下载插件

html5video的插件:https://github.com/bahriddin/ckeditor-html5-video

2. 修改ckeditor源码

通过使用ckeditor-》config.js-》extraPlugins配置启用html5video插件

config.extraPlugins = 'html5video';

image

2. 将html5video加到CKEDITOR_CONFIGS里

image
image

3. 让前台页面,video标签有播放控件

// video播放,没有指定 controls 属性,视频不会展示浏览器自带的控件
$('video').attr('controls', '');

image

4. 测试

image

Hole yor life get everything if you never give up.
原文地址:https://www.cnblogs.com/1fengchen1/p/15072233.html