xushiting 3 jaren geleden
bovenliggende
commit
85037eeba0
1 gewijzigde bestanden met toevoegingen van 22 en 0 verwijderingen
  1. 22 0
      dependencies/ckeditor_plugins/insertsound/dialogs/insertsound.js

+ 22 - 0
dependencies/ckeditor_plugins/insertsound/dialogs/insertsound.js

@@ -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);
+        }
+    };
+});