plugin.js 543 B

1234567891011121314151617181920212223
  1. CKEDITOR.plugins.add( 'insertsound', {
  2. icons: 'insertsound',
  3. init: function( editor ) {
  4. editor.addCommand( 'insertsound', new CKEDITOR.dialogCommand( 'insertsoundDialog', {
  5. allowedContent: {
  6. audio: {
  7. attributes: 'controls'
  8. },
  9. source: {
  10. attributes: '!src'
  11. }
  12. },
  13. requiredContent: 'audio'
  14. }));
  15. editor.ui.addButton( 'insertsound', {
  16. label: 'Insert audio',
  17. command: 'insertsound',
  18. toolbar: 'insert'
  19. });
  20. CKEDITOR.dialog.add( 'insertsoundDialog', this.path + 'dialogs/insertsound.js' );
  21. }
  22. });