Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Html 5 Video Plugin for CKEditor 4.1.1

There was a HTML 5 plugin for ckedior here http://ckeditor.com/forums/Plugins/HTML5-Video

but unfortunately Video plugin doesn't work correctly on CKEditor 4.1.1

It works until you don't see the source, if you click on source and return to editor it write 'Your browser doesn't support video. ...'

Could you please guide me ?

like image 773
Mohammad Dayyan Avatar asked Dec 01 '22 03:12

Mohammad Dayyan


2 Answers

Instead of turning off the content filtering completely in your ckedito you can just specify

extraAllowedContent: 'video[*]{*}'

in the config.js file.

like image 146
gvlax Avatar answered Dec 05 '22 22:12

gvlax


Just got the same issue. It seems, that is because, in CKEditor 4.1, they added some Advanced Content Filter. And in fact, if the plugin doesn't say explicitelly that some tag, as <video></video> are allowed, they will be just removed by the source editor !!! My workaround was to disable ACF in the editor, by adding the following line at the begining of the ckeditor/config.js file :

CKEDITOR.config.allowedContent = true;

By this way, source editor doesn't check anymore for the html content, so it does accept everything !! As a consequence, <video>...</video> tag is no more removed !

Hopping it helps

Cheers -Christian

like image 43
Christian Avatar answered Dec 05 '22 20:12

Christian