Open atlguy opened 7 years ago
editor.addCommand( 'html5video', new CKEDITOR.dialogCommand( 'html5video' ) );
editor.ui.addButton && editor.ui.addButton( 'html5video', {
label: editor.lang.html5video.button,
command: 'html5video',
toolbar: 'insert,20'
});
In plugin.js, add this code just before
CKEDITOR.dialog.add( 'html5video', this.path + 'dialogs/html5video.js' );
and in your toolbar use name html5video
Thank you. I tried that the button is not appearing.
I managed to make it work:
var editor = CKEDITOR.replace( 'editor_text', {
extraPlugins : 'html5video,lineutils,clipboard,widget,widgetselection,widgetcommon',
toolbar : [
[ 'Image', 'html5video'],
];,
});
editor.addCommand( 'html5video', new CKEDITOR.dialogCommand( 'html5video' ) );
editor.ui.addButton && editor.ui.addButton( 'html5video', {
label : 'Video',
command : 'html5video'
});
Ignore this one:
CKEDITOR.dialog.add( 'html5video', this.path + 'dialogs/html5video.js' );
Hi, guys. Due to my very busy student life, I am currently unable to help you. I hope after 2 weeks when the semester ends, I can help you actively. Cheers!
I've found that you don't need to add:
editor.addCommand( 'html5video', new CKEDITOR.dialogCommand( 'html5video' ) );
This just breaks the video insertion. Just this should work:
editor.ui.addButton && editor.ui.addButton( 'html5video', {
label : 'Video',
command : 'html5video'
});
Hi, mates. Can I close this issue?
tried all of above solution, nothing is working for me :(
it's still nothing :(
I use it with CKEditor 4.14 and django-ckeditor. I don't know why it works, but we have to define a button name with the First Capital letter, like this: 'Html5video' Example of my toolbar config:
{
'name': 'insert',
'items': ['Image', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe', 'Html5video']
},
Sorry guys. I am not using CKEditor for several years and not quite sure what is happening here. PRs are welcome if you know the solution.
It appears that this plug-in can only be used if using a toolbar group. Can you please add support for toolbar items so I can load and position this in a toolbar instead of using the group feature?