|
@@ -0,0 +1,22 @@
|
|
|
|
+CKEDITOR.dialog.add('insertsoundDialog', function(editor) {
|
|
|
|
+ return {
|
|
|
|
+ title: "Insert audio",
|
|
|
|
+ minWidth: 300,
|
|
|
|
+ minHeight: 150,
|
|
|
|
+ contents: [{
|
|
|
|
+ id: 'tab',
|
|
|
|
+ label: 'Settings',
|
|
|
|
+ elements: [{
|
|
|
|
+ type: 'text',
|
|
|
|
+ id: 'url',
|
|
|
|
+ label: 'Please enter an MP3 URL to insert:',
|
|
|
|
+ validate: CKEDITOR.dialog.validate.notEmpty("URL field cannot be empty.")
|
|
|
|
+ }]
|
|
|
|
+ }],
|
|
|
|
+ onOk: function() {
|
|
|
|
+ var string = '<audio controls><source src="' + this.getValueOf('tab', 'url') + '">';
|
|
|
|
+ string += 'Your browser does not support the audio element.</source></audio>';
|
|
|
|
+ editor.insertHtml(string);
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+});
|