参考信息
为Django ckeditor配置上传视频:https://www.byincd.com/bobjiang/article-01128/
使用
1. 手动下载插件
html5video的插件:https://github.com/bahriddin/ckeditor-html5-video
解压插件,将 html5video
放到 site-packages
的目录里
2. 修改ckeditor源码
通过使用ckeditor-》config.js-》extraPlugins配置启用html5video插件
config.extraPlugins = 'html5video';
2. 将html5video加到CKEDITOR_CONFIGS里
3. 让前台页面,video标签有播放控件
// video播放,没有指定 controls 属性,视频不会展示浏览器自带的控件
$('video').attr('controls', '');
4. 压缩静态文件
python manage.py collectstatic --noinput
python manage.py compress --force
5. 测试
Original: https://www.cnblogs.com/1fengchen1/p/15072233.html
Author: SonnyZhang
Title: django-ckeditor配置html5video上传视频
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/590895/
转载文章受原作者版权保护。转载请注明原作者出处!