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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章