kindeditor編輯器默認是有一個插入音視頻的按鈕,但是,插入視頻卻播放不出來,音頻具體沒有測試。我們今天的目的就是修改編輯器,讓其能播放視頻。將集成好ckplayer的編輯器上傳到您網站的跟目錄。
第一步:修改工具條配置
在發布文集頁面調用已加入視頻播放器插件的kindeditor,調用方法參照http://www.kindsoft.net/docs/usage.html中的說明。如果自定義配置了輯器的工具欄的情況下,請務必在 items 加入 'insertfile',位置無要求;
items : [
'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
'flash', 'media','insertVideo', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
'anchor', 'link', 'unlink', '|', 'about'
],
第二步:在展示頁面引入ckplayer
<br>
第三步:修改/kindeditor/plugins/insertVideo/ckplayer/ckplayer.txt
{p->1}{b->1}{x->http://您的域名/kindeditor/plugins/insertVideo/ckplayer/ckplayer.xml}{s->0}{l->}{r->}{t->}
將您的域名替換即可
我看了很多教程,這里都沒提及到,曾經我為了去掉播放器廣告,參考了去掉播放器廣告的配置修改了文件,但是沒有起到任何作用,在這兒花了很多時間,原因就是這兒引用的是一個遠程的配置文件,導致我怎么修改配置文件都無效。
附件提供集成文件下載